all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Barry Margolin <barmar@alum.mit.edu>
To: help-gnu-emacs@gnu.org
Subject: Re: why read only buffer?
Date: Fri, 06 Jul 2012 18:40:31 -0400	[thread overview]
Message-ID: <barmar-43BAD2.18403106072012@news.eternal-september.org> (raw)
In-Reply-To: slrnjvenia.3be.notbob@nbleet.hcc.net

In article <slrnjvenia.3be.notbob@nbleet.hcc.net>,
 notbob <notbob@nothome.com> wrote:

> On 2012-07-06, PJ Weisberg <pj@irregularexpressions.net> 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 ***


  reply	other threads:[~2012-07-06 22:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-06 19:04 why read only buffer? notbob
2012-07-06 19:44 ` Alp Aker
2012-07-06 20:58   ` PJ Weisberg
     [not found]   ` <mailman.4218.1341608337.855.help-gnu-emacs@gnu.org>
2012-07-06 21:50     ` notbob
2012-07-06 22:40       ` Barry Margolin [this message]
     [not found] ` <mailman.4213.1341603883.855.help-gnu-emacs@gnu.org>
2012-07-06 21:02   ` notbob

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

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

  git send-email \
    --in-reply-to=barmar-43BAD2.18403106072012@news.eternal-september.org \
    --to=barmar@alum.mit.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.