From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: why read only buffer? Date: Fri, 06 Jul 2012 18:40:31 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1341614717 16071 80.91.229.3 (6 Jul 2012 22:45:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 6 Jul 2012 22:45:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 07 00:45:16 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SnHGz-0003sV-5l for geh-help-gnu-emacs@m.gmane.org; Sat, 07 Jul 2012 00:45:13 +0200 Original-Received: from localhost ([::1]:44771 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnHGy-0006GS-8q for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Jul 2012 18:45:12 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-2.dfn.de!news.dfn.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Injection-Info: barmar.motzarella.org; posting-host="ePtxJaRXJPFeIWBMlKfZaA"; logging-data="949"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/nClp04w8616ijjbIPB8PL" User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Cancel-Lock: sha1:Bs5986Shn/MrBAN4mbOio2BrCU4= Original-Xref: usenet.stanford.edu gnu.emacs.help:193320 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:85707 Archived-At: In article , notbob wrote: > On 2012-07-06, PJ Weisberg wrote: > > > That's deliberately there to stop you from accidentally modifying a > > backup file when you meant to be working with the regular file. If > > you searched through the source you'd find this in files.el: > > Yeah, that's not gonna happen. ;) > > What I seem to recall is, backup files were progressively renamed for > more than on "back-up", as in foo~1, foo~2, or something similar. > Perhaps I'm thinking of jed. I'm old. I ferget. ;) foo.~1~, foo.~2~, etc. > > > > > ----- > > ;; Make people do a little extra work (C-x C-q) > > ;; before altering a backup file. > > (when (backup-file-name-p buffer-file-name) > > (setq buffer-read-only t)) > > ----- > > So, how does none set it to make it overwriteable, by default. Jes > delete the above code? A better way would be to add your own code to undo it to find-file-hook. The hooks are run at the end of this function. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***