Subject: bug#78890: 31.0.50; Messy vc-annotate buffer names

From: Sean Whitton <[email-masked]>
Date: Wed, 25 Jun 2025 17:25:40 +0100

Hello,

On Wed 25 Jun 2025 at 08:35am -07, Jim Porter wrote:

> On 6/25/2025 2:48 AM, Sean Whitton wrote:
>> On Tue 24 Jun 2025 at 11:02pm -07, Jim Porter wrote:
>>
>>> Here's another possible patch for this. It uses 'vc-parent-buffer', which
>>> might be nil when first annotating a file, but that works out nicely, since
>>> '(buffer-name nil)' gets the buffer name of the current buffer (i.e. the
>>> original source file). I think this should be safe, though I'm not an expert
>>> on the VC internals.
>> Thanks.  We could use vc-parent-buffer somehow, but not unconditionally
>> -- it's not always set, but only in certain interactive calls.
>
> I *think* it should always get set buffer-locally by 'vc-setup-buffer' once we
> actually run a command, since 'vc-do-command' calls that function. So it
> should be safe to use 'vc-parent-buffer', though we could add another call to
> 'vc-setup-buffer' if it's not guaranteed to be called by all backends or in
> all corner cases.

Sorry, what I meant was: it should indeed always be set, but it won't
always be the buffer whose name it makes sense to put in the name of the
*Annotated* buffer.

-- 
Sean Whitton