From: Noam Postavsky <npostavs@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: carlosjosepita@gmail.com, 31764@debbugs.gnu.org
Subject: bug#31764: 26.1; Point in VC change log is not centered as documented
Date: Mon, 11 Jun 2018 20:10:17 -0400 [thread overview]
Message-ID: <87602ozwye.fsf@gmail.com> (raw)
In-Reply-To: <83efhgtq25.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Jun 2018 09:46:42 +0300")
[-- Attachment #1: Type: text/plain, Size: 408 bytes --]
tags 31764 + patch
quit
Eli Zaretskii <eliz@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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1123 bytes --]
From 895d29eb6b010093245a67d7f05808d765195b7a Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@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
next prev parent reply other threads:[~2018-06-12 0:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-08 19:23 bug#31764: 26.1; Point in VC change log is not centered as documented Carlos Pita
2018-06-08 19:38 ` Eli Zaretskii
2018-06-08 19:57 ` Carlos Pita
2018-06-08 20:12 ` Eli Zaretskii
2018-06-08 20:15 ` Carlos Pita
2018-06-08 21:28 ` Carlos Pita
2018-06-08 21:47 ` Carlos Pita
2018-06-08 22:10 ` Carlos Pita
2018-06-09 0:29 ` Noam Postavsky
2018-06-09 0:57 ` Carlos Pita
2018-06-09 6:46 ` Eli Zaretskii
2018-06-09 14:18 ` Carlos Pita
2018-06-12 0:10 ` Noam Postavsky [this message]
2018-06-12 2:32 ` Eli Zaretskii
2018-06-14 23:20 ` Noam Postavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87602ozwye.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=31764@debbugs.gnu.org \
--cc=carlosjosepita@gmail.com \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.