GNU bug report logs - #52826
vc-revert fails on non-default buffer name

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Mon, 27 Dec 2021 18:16:01 UTC

Severity: normal

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Juri Linkov <juri <at> linkov.net>, 52826 <at> debbugs.gnu.org
Subject: bug#52826: vc-revert fails on non-default buffer name
Date: Tue, 28 Dec 2021 02:32:30 +0200
On 27.12.2021 20:53, Juri Linkov wrote:
> When such customization is used:
> 
>    (add-hook 'diff-mode-hook 'rename-uniquely)
> 
> that uniquely renames*vc-diff*  to*vc-diff*<number>,
> then 'vc-revert' completely breaks up because of the hard-coded buffer name.
> This patch should fix it:
> 
> diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
> index 9fc9169821..5a99025289 100644
> --- a/lisp/vc/vc.el
> +++ b/lisp/vc/vc.el
> @@ -2785,7 +2785,7 @@ vc-revert
>       (unwind-protect
>   	(when (if vc-revert-show-diff
>   		  (progn
> -		    (setq diff-buffer (generate-new-buffer-name "*vc-diff*"))
> +		    (setq diff-buffer (generate-new-buffer "*vc-diff*"))
>   		    (vc-diff-internal vc-allow-async-revert vc-fileset
>   				      nil nil nil diff-buffer))
>   		;; Avoid querying the user again.

If this help, LGTM.




This bug report was last modified 3 years and 147 days ago.

Previous Next


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