[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21067: 25.0.50; [PATCH] With mercurial, vc-print-log puts point at e

From: Dmitry Gutov
Subject: bug#21067: 25.0.50; [PATCH] With mercurial, vc-print-log puts point at eob
Date: Sun, 19 Jul 2015 03:08:28 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0

On 07/15/2015 02:09 PM, Wolfgang Jenkner wrote:

So I wonder whether it wouldn't be worthwile to make their job easier
(and thereby avoid bugs like the one described above) by handling async
and sync processes alike in this respect.  The condition for this to
work is that backend functions don't expect point to be preserved,
except, of course, if it is actually their purpose to compute point
(like for vc-git-show-log-entry).

I like the idea, but FWIW the patch breaks diff-hl-revert-hunk (diff-hl is in GNU ELPA). Haven't investigated it further yet.

And the particular bug you've described, naturally, can also be fixed by making vc-hg-print-log asynchronous:

diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 556174a..f634e2e 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -272,7 +272,7 @@ If LIMIT is non-nil, show no more than this many entries."
   (let ((inhibit-read-only t))
-      (apply 'vc-hg-command buffer 0 files "log"
+      (apply 'vc-hg-command buffer 'async files "log"
              (when start-revision (list (format "-r%s:0" start-revision)))
              (when limit (list "-l" (format "%s" limit)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]