GNU bug report logs - #40967
27.0.50; vc-diff in indirect buffers

Previous Next

Package: emacs;

Reported by: Nathan Moreau <nathan.moreau <at> m4x.org>

Date: Wed, 29 Apr 2020 18:02:01 UTC

Severity: normal

Tags: fixed

Found in version 27.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 40967 <at> debbugs.gnu.org (full text, mbox):

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Dmitry Gutov <dgutov <at> yandex.ru>, Nathan Moreau <nathan.moreau <at> m4x.org>,
 40967 <at> debbugs.gnu.org
Subject: Re: bug#40967: 27.0.50; vc-diff in indirect buffers
Date: Wed, 17 Jun 2020 00:08:40 +1200
On 30/04/20 6:13 am, Dmitry Gutov wrote:
> On 29.04.2020 21:01, Nathan Moreau wrote:
>> open any file-under-version-control
>> M-x clone-indirect-buffer
>> In the new buffer, run vc-diff fails with `vc-deduce-fileset:
>> Buffer [...] is not associated with a file`
>
> I'm not sure we really want to support that workflow. Or else
> a lot of commands would have to be changed the same way,
> inside and outside of VC.
>
> But opinions welcome.

FWIW, we did the same thing for `diff-buffer-with-file' quite
recently:

https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=1bcf5d02da96784a04034b4c0aba8fdfa1413c4e

Personally I'd be ok with seeing piecemeal changes to commands
like these to enable certain common workflows to DTRT with
indirect buffers.  I think there will likely be a subset of
commands which are of higher value than others, and so there
might not be such a vast number of things which are very useful
to change in practice.  (Or maybe it's a slippery slope.)

Something like the following might be convenient:

 (defun buffer-base-buffer-file-name (&optional buffer)
   "Like `buffer-file-name', but also supporting indirect buffers."
   (buffer-file-name
    (or (buffer-base-buffer buffer) buffer (current-buffer))))


-Phil





This bug report was last modified 4 years and 223 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.