GNU bug report logs -
#44026
[PATCH] vc.el: vc-revision-other-window does not select the buffer
Previous Next
Reported by: Koichi Arakawa <arakawa <at> pp.iij4u.or.jp>
Date: Fri, 16 Oct 2020 03:15:02 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
The current version of vc-revision-other-window does not select a
buffer which contains the specified revision. But ediff-vc-internal,
for example, expects the buffer is selected as the current one.
So I think the following patch is needed.
Regards,
Koichi Arakawa
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 46c44fa54b..f34bd0f2a1 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2058,13 +2058,12 @@ If `F.~REV~' already exists, use it instead of checking it out again."
(list
(vc-read-revision "Revision to visit (default is working revision): "
(list buffer-file-name)))))
- (with-current-buffer (or (buffer-base-buffer) (current-buffer))
- (vc-ensure-vc-buffer)
- (let* ((file buffer-file-name)
- (revision (if (string-equal rev "")
- (vc-working-revision file)
- rev)))
- (switch-to-buffer-other-window (vc-find-revision file revision)))))
+ (vc-ensure-vc-buffer)
+ (let* ((file buffer-file-name)
+ (revision (if (string-equal rev "")
+ (vc-working-revision file)
+ rev)))
+ (switch-to-buffer-other-window (vc-find-revision file revision))))
(defun vc-find-revision (file revision &optional backend)
"Read REVISION of FILE into a buffer and return the buffer.
This bug report was last modified 4 years and 220 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.