GNU bug report logs -
#78890
31.0.50; Messy vc-annotate buffer names
Previous Next
Reported by: Kristoffer Balintona <krisbalintona <at> gmail.com>
Date: Tue, 24 Jun 2025 10:43:02 UTC
Severity: normal
Found in version 31.0.50
Fixed in version 31.1
Done: Sean Whitton <spwhitton <at> spwhitton.name>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Thu, 26 Jun 2025 16:06:37 +0100 Sean Whitton <spwhitton <at> spwhitton.name> wrote:
> Hello,
>
> On Wed 25 Jun 2025 at 06:19pm +02, Stephen Berman via "Bug reports for GNU
> Emacs, the Swiss army knife of text editors" wrote:
>
>> On Wed, 25 Jun 2025 08:57:59 -0700 Jim Porter <jporterbugs <at> gmail.com> wrote:
>>
>>> On 6/25/2025 8:47 AM, Stephen Berman via Bug reports for GNU Emacs, the Swiss
>>> army knife of text editors wrote:
>>>> Oops, I should've checked instead of assuming.
>>>> (https://www.imdb.com/title/tt0664250/quotes/?item=qt2409883)
>>>
>>> Well, when I looked at the code change, I'd have figured it would be in Emacs
>>> 30 too, since that line is the same in 30 and the master branch. The bug is
>>> new though, so something else changed, which worries me a little bit. It might
>>> be a good idea to figure out what cause this regression in case it causes
>>> other problems we're not aware of yet.
>>
>> I checked now, and in emacs-30 the current buffer when temp-buffer-name
>> is set is the one visiting the file being annotated, while in master
>> it's the buffer displaying the annotations. In emacs-30 there is a call
>> to `vc-ensure-vc-buffer' before the let sexp where temp-buffer-name is
>> set, but not in master; adding that back seems to fix the problem.
>
> Thanks for looking again and figuring this out.
>
> Removing vc-ensure-vc-buffer was intentional, and it shouldn't just go
> back -- that was part of adding vc-buffer-overriding-fileset.
Yeah, I assumed it was removed for a good reason.
> What do
> you both think to something like this:
>
> diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el
> index de432e4e1c3..99df932af83 100644
> --- a/lisp/vc/vc-annotate.el
> +++ b/lisp/vc/vc-annotate.el
> @@ -419,7 +419,12 @@ vc-annotate
> (read-string (format-prompt "Annotate span days" 20)
> nil nil "20"))))))))
> (setq vc-annotate-display-mode display-mode) ;Not sure why. --Stef
> - (let* ((temp-buffer-name (format "*Annotate %s (rev %s)*" (buffer-name) rev))
> + (let* ((file-buffer (get-file-buffer file))
> + (temp-buffer-name (format "*Annotate %s (rev %s)*"
> + (if file-buffer
> + (buffer-name file-buffer)
> + file)
> + rev))
> (temp-buffer-show-function 'vc-annotate-display-select)
> ;; If BUF is specified, we presume the caller maintains current line,
> ;; so we don't need to do it here. This implementation may give
That works fine. Thanks.
Steve Berman
This bug report was last modified 20 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.