From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Newsgroups: gmane.emacs.help Subject: Re: Why emacs touches read-only file? Date: 18 Apr 2007 21:43:54 -0700 Organization: http://groups.google.com Message-ID: <1176957833.977449.134340@e65g2000hsc.googlegroups.com> References: <1176920422.786251.122770@d57g2000hsg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1176960962 22073 80.91.229.12 (19 Apr 2007 05:36:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Apr 2007 05:36:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 19 07:35:56 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HePJB-0007tm-OI for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Apr 2007 07:35:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HePO5-0003og-Kw for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Apr 2007 01:40:57 -0400 Original-Path: shelby.stanford.edu!newshub.stanford.edu!postnews.google.com!e65g2000hsc.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 47 Original-NNTP-Posting-Host: 24.161.175.223 Original-X-Trace: posting.google.com 1176957834 30622 127.0.0.1 (19 Apr 2007 04:43:54 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 19 Apr 2007 04:43:54 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20060601 Firefox/2.0.0.3 (Ubuntu-edgy),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: e65g2000hsc.googlegroups.com; posting-host=24.161.175.223; posting-account=sSuG_Q0AAACBMwnT3Ej4aAinBHQ74NmN Original-Xref: shelby.stanford.edu gnu.emacs.help:147208 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:42812 Archived-At: On Apr 18, 12:22 pm, 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: #". > > 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?