unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* mismatch between what Emacs considers read-only and file permissions
@ 2015-02-04 17:12 Will Parsons
  2015-02-04 19:04 ` Eli Zaretskii
       [not found] ` <mailman.19279.1423076671.1147.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Will Parsons @ 2015-02-04 17:12 UTC (permalink / raw)
  To: help-gnu-emacs

How does Emacs determine whether to mark a buffer read-only when
visiting a file that is writable?  I've encountered anomalies under
two separate conditions:

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.  I've dealt with this
by simply binding a key to toggle-read-only and using it when editing
a writable file that is marked read-only.

2) Editing system configuration files as root under FreeBSD

This is more puzzling.  Normally, if I edit a system configuration
file (e.g., /etc/fstab), I'm working in an X-session as a regular
user.  I then su to root and fire up Emacs to edit the file, and there
is no problem.  Occasionally, however, I log into a console directly
as root to edit a configuation file, and here Emacs marks the buffer
as read-only when the file permissions are:

-rw-r--r--  1 root  wheel

Thre is no problem actually editing and saving the file if the buffer
read-only attribute is turned off, but why is Emacs marking it
read-only in the first place?

(Emacs version is 24.4.1.)

-- 
Will


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-02-05 13:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-04 17:12 mismatch between what Emacs considers read-only and file permissions Will Parsons
2015-02-04 19:04 ` Eli Zaretskii
     [not found] ` <mailman.19279.1423076671.1147.help-gnu-emacs@gnu.org>
2015-02-04 19:53   ` Will Parsons
2015-02-04 20:00     ` Eli Zaretskii
     [not found]     ` <mailman.19282.1423080028.1147.help-gnu-emacs@gnu.org>
2015-02-04 20:19       ` Will Parsons
2015-02-05 13:24     ` Stefan Monnier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).