[Top][All Lists]

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

mismatch between what Emacs considers read-only and file permissions

From: Will Parsons
Subject: mismatch between what Emacs considers read-only and file permissions
Date: 4 Feb 2015 17:12:52 GMT
User-agent: slrn/1.0.2 (FreeBSD)

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.)


reply via email to

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