unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Matthew Flaschen <matthew.flaschen@gatech.edu>
To: emacs <help-gnu-emacs@gnu.org>
Subject: Re: Why emacs touches read-only file?
Date: Wed, 18 Apr 2007 23:00:48 -0400	[thread overview]
Message-ID: <4626DB60.1000908@gatech.edu> (raw)
In-Reply-To: <kl3b2xmqsc.fsf@xoc2.stanford.EDU>

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	other threads:[~2007-04-19  3:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-18 18:20 Why emacs touches read-only file? Daniel
2007-04-18 18:49 ` Eric Hanchrow
2007-04-18 19:22 ` Glenn Morris
2007-04-19  3:00   ` Matthew Flaschen [this message]
2007-04-19  4:43   ` Daniel
2007-04-19  7:51     ` Glenn Morris
2007-04-19 18:09       ` Daniel
2007-04-19 19:07         ` Peter Dyballa
     [not found]         ` <mailman.2277.1177009971.7795.help-gnu-emacs@gnu.org>
2007-04-19 21:28           ` Daniel
2007-04-20  1:02           ` EMacs & X-windows "Wilfred Zegwaard (privé)"
2007-04-20  9:03             ` Peter Dyballa
2007-04-19 10:07     ` Why emacs touches read-only file? Arne Schmitz
2007-04-19 18:10       ` Daniel
2007-04-20  2:28 ` Tim X
2007-04-20  7:00   ` Daniel
2007-04-20 14:51     ` Daniel
2007-04-21  3:48     ` Tim X
2007-04-21 12:46     ` Johan Bockgård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4626DB60.1000908@gatech.edu \
    --to=matthew.flaschen@gatech.edu \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).