[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why emacs touches read-only file?
From: |
Glenn Morris |
Subject: |
Re: Why emacs touches read-only file? |
Date: |
Wed, 18 Apr 2007 12:22:11 -0700 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
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.