GNU bug report logs - #78890
31.0.50; Messy vc-annotate buffer names

Previous Next

Package: emacs;

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

From: Jim Porter <jporterbugs <at> gmail.com>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: Stephen Berman <stephen.berman <at> gmx.net>, Kristoffer Balintona <krisbalintona <at> gmail.com>, 78890 <at> debbugs.gnu.org
Subject: bug#78890: 31.0.50; Messy vc-annotate buffer names
Date: Thu, 26 Jun 2025 09:54:00 -0700
On 6/26/2025 8:06 AM, Sean Whitton wrote:
> Removing vc-ensure-vc-buffer was intentional, and it shouldn't just go
> back -- that was part of adding vc-buffer-overriding-fileset.  What do
> you both think to something like this:

One small issue I noticed: if you kill the original buffer, then 
'file-buffer' will be nil and we fall back to using 'file' when naming 
the Annotate buffer. We should probably just use the nondirectory part 
of file though. Otherwise, we'd display the absolute filename in the 
Annotate buffer name. Something like this patch:

----------------------------------------

diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el
index de432e4e1c3..d0077af4db9 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-name-nondirectory 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




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.