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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52826 in the body.
You can then email your comments to 52826 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#52826; Package emacs. (Mon, 27 Dec 2021 18:16:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> linkov.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 27 Dec 2021 18:16:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: vc-revert fails on non-default buffer name
Date: Mon, 27 Dec 2021 19:53:38 +0200
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.
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52826; Package emacs. (Tue, 28 Dec 2021 00:34:02 GMT) Full text and rfc822 format available.

Message #8 received at 52826 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Juri Linkov <juri <at> linkov.net>, 52826 <at> debbugs.gnu.org
Subject: Re: 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52826; Package emacs. (Tue, 28 Dec 2021 08:50:02 GMT) Full text and rfc822 format available.

Message #11 received at 52826 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 52826 <at> debbugs.gnu.org
Subject: Re: bug#52826: vc-revert fails on non-default buffer name
Date: Tue, 28 Dec 2021 10:47:39 +0200
close 52826 29.0.50
quit

> If this help, LGTM.

So pushed to master in a17a11df04.




bug marked as fixed in version 29.0.50, send any further explanations to 52826 <at> debbugs.gnu.org and Juri Linkov <juri <at> linkov.net> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Tue, 28 Dec 2021 08:50:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 25 Jan 2022 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 90 days ago.

Previous Next


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