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

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

Re: Why emacs touches read-only file?


From: Matthew Flaschen
Subject: Re: Why emacs touches read-only file?
Date: Wed, 18 Apr 2007 23:00:48 -0400
User-agent: Thunderbird 1.5.0.10 (X11/20070306)

Glenn Morris wrote:
> Daniel wrote:
> 
>> 1. Create a file with permission of 444 (read-only) file.
> 
> OK:
> 
> touch 1
> chmod 444 1
> 
>> 2. Open the file using emacs.
> 
> OK:
> 
> emacs-21.3 -q --no-site-file 1
> 
>> My emacs open the read-only file as writable buffer.
> 
> Mine doesn't: "Note: file is write protected"
> 
>> Also, I can modify it and save it.
> 
> I can't: "Buffer is read-only: #<buffer 1>".
> 
> 
> I can if I do M-x toggle-read-only, but then when I go to save the
> file I am prompted "File 1 is write-protected; try to save anyway?".
> This all seems pretty robust.

However, if you then choose yes, it will allow you to save if you have
permissions to give yourself write access.  Moreover, the file will go
back to being read-only afterwards, which is a bit strange.

Matthew Flaschen





reply via email to

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