[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: *vc-diff* buffers are read-only, but M-k works
From: |
Juanma Barranquero |
Subject: |
Re: *vc-diff* buffers are read-only, but M-k works |
Date: |
Wed, 4 Mar 2009 16:54:46 +0100 |
On Wed, Mar 4, 2009 at 16:41, Chong Yidong <address@hidden> wrote:
> However, it's counter-intuitive that undo does not work.
> Probably the easiest fix is to define a diff-undo command that lifts the
> read-only restriction temporarily. Any thoughts?
Most operations on diff-mode buffers do not change the buffer or are
easily reversible (diff-reverse-direction, diff-unified->context,
etc.). Making the buffer read-write is a C-x C-q away, if the user
needs to use undo or normal editing commands.
What is a bit of a pain is that the user cannot easily setup vc-diff
to default to a read-write buffer, because there's no vc-diff-hook and
`(setq buffer-read-only t)' is done after calling diff-mode, so
diff-mode-hook isn't useful either. The only way right now (other than
modifying the source) is to advise vc-diff.
My 0.02€
Juanma