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: Daniel
Subject: Re: Why emacs touches read-only file?
Date: 18 Apr 2007 21:43:54 -0700
User-agent: G2/1.0

On Apr 18, 12:22 pm, Glenn Morris <rgm+n...@stanford.edu> 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.
>
> > (AMAZING, emacs IGNORES unix file system. WOW.)
>
> Not really. It does what you tell it do, and provides you with plenty
> of notification as it does so.
>
> > What happened to the emacs, and how it works properly (open files as
> > read-only if it is read-only, and as writable if it is writable.)
>
> As described, your Emacs is not behaving in the standard way, so
> something on your system must be making it act like this.

It is very weird. In my work place, I was using REDHAT 9 and SUSE 9.3.
In there, emacs (21) write the buffer regardless of the file
permission. I am using Ubuntu in my home, and installed "GNU Emacs
22.0.50.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of
2006-09-19 on rothera, modified by Debian", which works properly.

Hmm...Something wrong in the emacs in SUSE 9.3 or REDHAT 9. How can I
fix the problem? What part should I see?



reply via email to

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