GNU bug report logs - #63949
30.0.50; `vc-print-log´ does not erase buffer when called from *vc-change-log* buffer, at least for CVS logs

Previous Next

Package: emacs;

Reported by: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>

Date: Wed, 7 Jun 2023 21:06:01 UTC

Severity: normal

Found in version 30.0.50

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
Cc: 63949 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#63949: 30.0.50; `vc-print-log´ does not erase buffer when called from *vc-change-log* buffer, at least for CVS logs
Date: Tue, 20 Jun 2023 05:41:47 +0300
(Please keep the bug address in Cc).

On 18/06/2023 16:21, Jens Schmidt wrote:
> On 2023-06-18  14:00, Dmitry Gutov wrote:
> 
>> Could you test the patch I showed?
> 
> Will do, pls just give me some time here...

Thanks. If we can verify that the part broken by the bisected revision, 
is fixed here, we could push that to Emacs 29 and then clean up for 
Emacs 30 more thoroughly.

In the meantime, here's the updated patch. The previous one discarded 
the return value :(

diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 91d3f6f70d3..c8b2b3ac11d 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1121,10 +1121,15 @@ vc-deduce-fileset
 the returned list.

 BEWARE: this function may change the current buffer."
-  (with-current-buffer (or (buffer-base-buffer) (current-buffer))
-    (vc-deduce-fileset-1 not-state-changing
-                         allow-unregistered
-                         state-model-only-files)))
+  (let (new-buf res)
+    (with-current-buffer (or (buffer-base-buffer) (current-buffer))
+      (setq res
+            (vc-deduce-fileset-1 not-state-changing
+                                 allow-unregistered
+                                 state-model-only-files))
+      (setq new-buf (current-buffer)))
+    (set-buffer new-buf)
+    res))

 (defun vc-deduce-fileset-1 (not-state-changing
                             allow-unregistered





This bug report was last modified 1 year and 312 days ago.

Previous Next


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