GNU bug report logs -
#31764
26.1; Point in VC change log is not centered as documented
Previous Next
Reported by: Carlos Pita <carlosjosepita <at> gmail.com>
Date: Fri, 8 Jun 2018 19:25:01 UTC
Severity: normal
Tags: fixed, patch
Merged with 44001
Found in version 26.1
Fixed in version 26.2
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
tags 31764 + patch
quit
Eli Zaretskii <eliz <at> gnu.org> writes:
>> I can reproduce this on GNU/Linux, but not on Windows (both tested with
>> latest emacs-26).
>
> Isn't that strange? The code involved isn't platform specific.
Looks like a matter of timing, if I add a (sit-for 1) to beginning of
vc-exec-after (or use edebug), then I can reproduce on Windows too.
Adding a save-excursion seems to fix it.
[v1-0001-Keep-vc-print-log-from-putting-point-at-buffer-en.patch (text/x-diff, inline)]
From 895d29eb6b010093245a67d7f05808d765195b7a Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> gmail.com>
Date: Mon, 11 Jun 2018 20:00:54 -0400
Subject: [PATCH v1] Keep vc-print-log from putting point at buffer end
(Bug#31764)
* lisp/vc/vc.el (vc-print-log-internal): Use `save-excursion' around
`vc-print-log-setup-buttons'.
---
lisp/vc/vc.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 93e9c25cbf..41a76e0007 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2256,8 +2256,9 @@ vc-print-log-internal
(vc-call-backend bk 'print-log files-arg buf shortlog
(when is-start-revision working-revision) limit))
(lambda (_bk _files-arg ret)
- (vc-print-log-setup-buttons working-revision
- is-start-revision limit ret))
+ (save-excursion
+ (vc-print-log-setup-buttons working-revision
+ is-start-revision limit ret)))
;; When it's nil, point really shouldn't move (bug#15322).
(when working-revision
(lambda (bk)
--
2.11.0
This bug report was last modified 4 years and 214 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.