unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Daniel <hanmoai@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Why emacs touches read-only file?
Date: 18 Apr 2007 21:43:54 -0700	[thread overview]
Message-ID: <1176957833.977449.134340@e65g2000hsc.googlegroups.com> (raw)
In-Reply-To: <kl3b2xmqsc.fsf@xoc2.stanford.EDU>

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?

  parent reply	other threads:[~2007-04-19  4:43 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
2007-04-19  4:43   ` Daniel [this message]
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=1176957833.977449.134340@e65g2000hsc.googlegroups.com \
    --to=hanmoai@gmail.com \
    --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).