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

From: Dmitry Gutov <[email-masked]>
Date: Sun, 19 Jul 2015 14:05:04 +0300

On 07/19/2015 04:36 AM, Wolfgang Jenkner wrote:

> If I read diff-hl-revert-hunk correctly the code in vc-exec-after
> expects point where (the synchronous call to) vc-diff-internal left it,
> which should not be at eob, which is exactly where my patch would put
> it :-(

It's not hard to fix, though: (goto-char (point-min)) at the beginning 
of vc-exec-after block there should do it. That would be 
backward-compatible, so I'm perfectly willing to make that change.

> It seems some code (not so far) out there uses synchronous calls for
> a reason and also does much more weird things in vc-exec-after than I'd
> have thought.

There are not too many third-party packages that integrate with VC, so 
one could go over them and check for similar assumptions. Your patch 
does make a certain amount of sense.

> If all -print-log backend functions can be made asynchronous there's
> nothing left to fix in the frontend I guess...

They can, but a similar problem could conceivably arise with something 
other than print-log.

On the other hand, the long-term target is to make all VC calls 
asynchronous. So maybe we can take the easy way out in fixing the 
present bug.