all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: PJ Weisberg <pj@irregularexpressions.net>
To: help-gnu-emacs@gnu.org
Subject: Re: why read only buffer?
Date: Fri, 6 Jul 2012 13:58:49 -0700	[thread overview]
Message-ID: <CAJsNXTmVSVjOtEwiVgc88UY31xDecmPd2RqcA7ymUN6_=Yh5pA@mail.gmail.com> (raw)
In-Reply-To: <CACxch4oH2eFbvwDqUsrOSi7CvcPtjjrYU+SYtubLHq4r4krBkQ@mail.gmail.com>

On Fri, Jul 6, 2012 at 12:44 PM, Alp Aker <alptekin.aker@gmail.com> wrote:
> On Fri, Jul 6, 2012 at 3:04 PM, notbob <notbob@nothome.com> wrote:
>> As you can see, it's a backup file.  So?  I can edit the regular file,
>> but not the backup (~) file.  Identical permissions.  WTF!?
>
> Use the command 'toggle-read-only' (default binding C-x C-q) if you
> want to edit a backup file.

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:

-----
  ;; 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))
-----

-PJ

Gehm's Corollary to Clark's Law: Any technology distinguishable from
magic is insufficiently advanced.



  reply	other threads:[~2012-07-06 20:58 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 [this message]
     [not found]   ` <mailman.4218.1341608337.855.help-gnu-emacs@gnu.org>
2012-07-06 21:50     ` notbob
2012-07-06 22:40       ` Barry Margolin
     [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='CAJsNXTmVSVjOtEwiVgc88UY31xDecmPd2RqcA7ymUN6_=Yh5pA@mail.gmail.com' \
    --to=pj@irregularexpressions.net \
    --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.