Subject: bug#21555: Subject: Re: bug#21555: 25.0.50; per-project *vc-change-log* buffers

From: Juri Linkov <[email-masked]>
Date: Wed, 28 May 2025 09:50:23 +0300

> With rename-uniquely added to log-view-mode-hook, revert-buffer now display
> another buffer. As a result after pressing g in a log view there's now two
> almost identical buffers displayed... Is this working as expected or should
> I open a bug report?

This is expected since it always worked this way.  It's inconvenient when
it pops up a window with a new buffer.  But OTOH, often it helps to compare
content before and after reverting.  The same applies to rename-uniquely
added to diff-mode-hook, etc.

It would be nice to configure the desired behavior with a simple
customization like

  (add-hook 'log-view-mode-hook
              (lambda ()
                (unless (eq this-command 'revert-buffer)
                  (rename-uniquely))))

But this works only for the initial buffer name *vc-change-log* and
doesn't keep the suffix in renamed buffers like *vc-change-log*<2>.