From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.help Subject: Re: Why emacs touches read-only file? Date: Wed, 18 Apr 2007 12:22:11 -0700 Organization: None Message-ID: References: <1176920422.786251.122770@d57g2000hsg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1176924941 8499 80.91.229.12 (18 Apr 2007 19:35:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 18 Apr 2007 19:35:41 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 18 21:35:36 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 1HeFwE-0003SW-Gx for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Apr 2007 21:35:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HeG15-00005t-Vy for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Apr 2007 15:40:36 -0400 Original-Path: shelby.stanford.edu!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: xoc2.stanford.edu Original-X-Trace: news.Stanford.EDU 1176924131 80 171.64.109.31 (18 Apr 2007 19:22:11 GMT) Original-X-Complaints-To: news@news.stanford.edu X-Spook: CNDD Iparretarrak defenses Al-Fatah MI6 ICBM plutonium X-Ran: MX2_;vT~9h)@Y<)fyf3r'I\CmzCUIW~(^'4@bu16FtMg=I^7>/7k7;{Fb-g)4A"0uok(?K X-Hue: cyan X-Attribution: GM Mail-Copies-To: nobody User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) Cancel-Lock: sha1:D0DZG/npplI/ZpSmmdqrp119ZWc= Original-Xref: shelby.stanford.edu gnu.emacs.help:147192 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:42796 Archived-At: 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.