* bug#44026: [PATCH] vc.el: vc-revision-other-window does not select the buffer
@ 2020-10-16 3:14 Koichi Arakawa
2020-10-16 5:27 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Koichi Arakawa @ 2020-10-16 3:14 UTC (permalink / raw)
To: 44026
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.
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#44026: [PATCH] vc.el: vc-revision-other-window does not select the buffer
2020-10-16 3:14 bug#44026: [PATCH] vc.el: vc-revision-other-window does not select the buffer Koichi Arakawa
@ 2020-10-16 5:27 ` Lars Ingebrigtsen
2020-10-16 6:26 ` Koichi Arakawa
0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-16 5:27 UTC (permalink / raw)
To: Koichi Arakawa; +Cc: 44026
Koichi Arakawa <arakawa@pp.iij4u.or.jp> writes:
> 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.
Do you have a recipe to reproduce this bug? When I use the `C-x v ~'
command, I don't get any errors.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#44026: [PATCH] vc.el: vc-revision-other-window does not select the buffer
2020-10-16 5:27 ` Lars Ingebrigtsen
@ 2020-10-16 6:26 ` Koichi Arakawa
2020-10-16 6:39 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Koichi Arakawa @ 2020-10-16 6:26 UTC (permalink / raw)
To: larsi; +Cc: 44026
Lars Ingebrigtsen <larsi@gnus.org> wrote:
> Koichi Arakawa <arakawa@pp.iij4u.or.jp> writes:
>
>> 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.
>
> Do you have a recipe to reproduce this bug? When I use the `C-x v ~'
> command, I don't get any errors.
Yes.
* Open a version controlled file,
* M-x ediff-revision,
* accept defaults,
you will see the identical two buffers in the window. And the file has
been deleted.
--
Koichi Arakawa
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#44026: [PATCH] vc.el: vc-revision-other-window does not select the buffer
2020-10-16 6:26 ` Koichi Arakawa
@ 2020-10-16 6:39 ` Lars Ingebrigtsen
2020-10-16 6:54 ` Koichi Arakawa
0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-16 6:39 UTC (permalink / raw)
To: Koichi Arakawa; +Cc: 44026
Koichi Arakawa <arakawa@pp.iij4u.or.jp> writes:
> Yes.
> * Open a version controlled file,
> * M-x ediff-revision,
> * accept defaults,
> you will see the identical two buffers in the window. And the file has
> been deleted.
Geez. The bug was introduced in the previous change for indirect
buffers. I've now made a different change than your proposed patch and
pushed to the trunk -- can you check whether this fixes the problem?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#44026: [PATCH] vc.el: vc-revision-other-window does not select the buffer
2020-10-16 6:39 ` Lars Ingebrigtsen
@ 2020-10-16 6:54 ` Koichi Arakawa
2020-10-16 7:13 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Koichi Arakawa @ 2020-10-16 6:54 UTC (permalink / raw)
To: larsi; +Cc: 44026
Lars Ingebrigtsen <larsi@gnus.org> wrote:
> Koichi Arakawa <arakawa@pp.iij4u.or.jp> writes:
>
>> Yes.
>> * Open a version controlled file,
>> * M-x ediff-revision,
>> * accept defaults,
>> you will see the identical two buffers in the window. And the file has
>> been deleted.
>
> Geez. The bug was introduced in the previous change for indirect
> buffers. I've now made a different change than your proposed patch and
> pushed to the trunk -- can you check whether this fixes the problem?
Sure. I've confirmed the fixes work properly. Thanks a lot.
--
Koichi Arakawa
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#44026: [PATCH] vc.el: vc-revision-other-window does not select the buffer
2020-10-16 6:54 ` Koichi Arakawa
@ 2020-10-16 7:13 ` Lars Ingebrigtsen
0 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-16 7:13 UTC (permalink / raw)
To: Koichi Arakawa; +Cc: 44026
Koichi Arakawa <arakawa@pp.iij4u.or.jp> writes:
> Sure. I've confirmed the fixes work properly. Thanks a lot.
Thanks for checking.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-16 7:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-16 3:14 bug#44026: [PATCH] vc.el: vc-revision-other-window does not select the buffer Koichi Arakawa
2020-10-16 5:27 ` Lars Ingebrigtsen
2020-10-16 6:26 ` Koichi Arakawa
2020-10-16 6:39 ` Lars Ingebrigtsen
2020-10-16 6:54 ` Koichi Arakawa
2020-10-16 7:13 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.