help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mismatch between what Emacs considers read-only and file permissions


From: Eli Zaretskii
Subject: Re: mismatch between what Emacs considers read-only and file permissions
Date: Wed, 04 Feb 2015 21:04:17 +0200

> From: Will Parsons <address@hidden>
> Date: 4 Feb 2015 17:12:52 GMT
> 
> How does Emacs determine whether to mark a buffer read-only when
> visiting a file that is writable?

By looking at the file permission bits.

> 1) Under Windows
> 
> I make heavy use of the Cygwin environment under Windows, but usually
> use the native Windows Emacs.  I've never bothered to track down the
> exact circumstances, but assume that Cygwin is setting file
> permissions in a way that confuses native Emacs.

Cygwin attempts to emulate Posix user/group/other permission bits by
manipulating Windows NT security attributes.  The way it does that
will only work as you'd expect when those attributes are tested by
Cygwin programs. Native Windows build of Emacs, OTOH, not only doesn't
support the Cygwin fiddling with the NTSec features, it doesn't even
look at those attributes when it checks files for accessibility;
instead, it probes only the read-only bit (which is not affected by
NTSec).

My advice is not to mix Cygwin programs with native Emacs on Windows.
Good native ports of Unix and GNU software to Windows are available,
and you are advised to use them instead, if you don't want to deal
with these incompatibilities.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]