GNU bug report logs - #21067
25.0.50; [PATCH] With mercurial, vc-print-log puts point at eob

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Wolfgang Jenkner <wjenkner@HIDDEN>; Keywords: patch moreinfo; Done: Dmitry Gutov <dgutov@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 21067-done <at> debbugs.gnu.org:


Received: (at 21067-done) by debbugs.gnu.org; 10 May 2021 11:57:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 10 07:57:41 2021
Received: from localhost ([127.0.0.1]:57583 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lg4Xd-0003DC-La
	for submit <at> debbugs.gnu.org; Mon, 10 May 2021 07:57:41 -0400
Received: from mail-wr1-f49.google.com ([209.85.221.49]:41727)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1lg4Xc-0003Cv-2F
 for 21067-done <at> debbugs.gnu.org; Mon, 10 May 2021 07:57:40 -0400
Received: by mail-wr1-f49.google.com with SMTP id d11so16313783wrw.8
 for <21067-done <at> debbugs.gnu.org>; Mon, 10 May 2021 04:57:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=2gE4cTv54E6KySA7c9Yg4nLlgLcjp8NyObGOZeBcdC8=;
 b=Kv+QP+bCGmemBS/T0TwTADOSqG9ldxEXpB+qb6rxD2VDbBt6iaKUyqlQqYhCbVrgez
 SetB+Xt7HjiT+Y+ZT5DKd39eVBeG6heXYCghiqPUVz9oBlGhxOifgz7jjMlVHfYYJVke
 4RWJJsjKXU3q7bec/OhvEIsNVluPY3MIH+EuB+X/uA/SHBjfD4oCPj+/6Mnk9u2/O4V5
 yjFzsvuB1qOJP4hAu4bV4XUOEUmCC8+9O7atOODUdIO4kVRrlZVjAQZUdRlkIfah+UXz
 wdPTA6DFeJtop1gxtwFW17hN/f+DbIs8r/Eyzii0Cqbhc+dXUNglwYVihr2Uy1c1yNwt
 V7mg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=2gE4cTv54E6KySA7c9Yg4nLlgLcjp8NyObGOZeBcdC8=;
 b=tDi/w+Nu5c2KEPaslh29b5MO1ubBc+psRV5oBJauoEXt8UJvCxPc7PC0fMUL1uN+VH
 qxeJUVZMP6DizDcnUt83sDHxIo5HPhKDzJ6IFhRKWqg+BeHQmYj4kx40StKbr2E71D8d
 Y6kh0jofSLFo4/TXQIKQT7FWf83gj0/ZSW8zCgcMPrwVAwvO3VhnA5sON4rnH6rVBnBe
 wpcrnVAZf5uQsmmxyHOU5FTaUo7JyA7YRGnU+zDC5NpczF+fatA1zo7/KKymyAnCxMGk
 F7izb9JDzjvWtSeHnmblw2ewLIFvDQXeL9MSy+NzUBfBsw/7btFG+pqjiwgUhsXCUPQt
 yoNg==
X-Gm-Message-State: AOAM5337ocJZ8BuF1EtQze3RR0Xd5nGoqM4TeTNnlfDERoEpk2avFVzA
 LRNj0kHcypswA7kuPJZP6lyHd5tqiWY=
X-Google-Smtp-Source: ABdhPJyLddRukAkvjt2EeFp8NzO+1Gn7aqp3ytD4PX4VAXTXjjNROewrZkUBaRjrEUbTynsNZxKN7w==
X-Received: by 2002:adf:ffc4:: with SMTP id x4mr29273038wrs.415.1620647854017; 
 Mon, 10 May 2021 04:57:34 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id
 m184sm19353276wme.40.2021.05.10.04.57.32
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 10 May 2021 04:57:33 -0700 (PDT)
Subject: Re: bug#21067: 25.0.50; [PATCH] With mercurial, vc-print-log puts
 point at eob
To: Lars Ingebrigtsen <larsi@HIDDEN>
References: <85lheh8ekr.fsf@HIDDEN> <55AAEA7C.2060609@HIDDEN>
 <85380ludu0.fsf@HIDDEN> <55B2483B.4030909@HIDDEN>
 <565BBC06.3070502@HIDDEN> <87r1iesu8w.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <ba289526-85dc-1c35-1c71-a173ff8c3408@HIDDEN>
Date: Mon, 10 May 2021 14:57:31 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.7.1
MIME-Version: 1.0
In-Reply-To: <87r1iesu8w.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 21067-done
Cc: Wolfgang Jenkner <wjenkner@HIDDEN>, 21067-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Version: 26.2

On 10.05.2021 14:28, Lars Ingebrigtsen wrote:
> This was five years ago -- skimming this thread, I'm not quite sure what
> the conclusion here was.  Is this something that should still be worked
> on, or has this problem gone away in the meantime?

Thanks for the reminder.

Looks like we've fixed this in Emacs 26.2. Commit fcd66d059, bug#31764.

Closing, reopen if you still can reproduce.




Notification sent to Wolfgang Jenkner <wjenkner@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Dmitry Gutov <dgutov@HIDDEN>:
You have taken responsibility. Full text available.
Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 21067 <at> debbugs.gnu.org:


Received: (at 21067) by debbugs.gnu.org; 10 May 2021 11:28:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 10 07:28:41 2021
Received: from localhost ([127.0.0.1]:57534 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lg45Z-0006UA-GE
	for submit <at> debbugs.gnu.org; Mon, 10 May 2021 07:28:41 -0400
Received: from quimby.gnus.org ([95.216.78.240]:34130)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1lg45X-0006Ts-Po
 for 21067 <at> debbugs.gnu.org; Mon, 10 May 2021 07:28:40 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=oXg7Lo5B18PrsoWt+Na+pq90HICkhSmeTM74V2YhPGQ=; b=rNWnN+9d6LcpsHB6njXuvp/ZJ/
 7SZnddO7bWhb/H8HDdx/X1JiL+8jDezrsq0xhc2xfxXSozX7pZiltCztsZBt++Fg+BysaEyj266/h
 l3L0tcopE+aPH/p2xjgDY0gi+kU9bVbE8Mo/aSZt2CZGzv+wu3JbJP2wwfgUq9jJZ9+8=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1lg45P-0007X1-Ro; Mon, 10 May 2021 13:28:34 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#21067: 25.0.50; [PATCH] With mercurial, vc-print-log puts
 point at eob
References: <85lheh8ekr.fsf@HIDDEN> <55AAEA7C.2060609@HIDDEN>
 <85380ludu0.fsf@HIDDEN> <55B2483B.4030909@HIDDEN>
 <565BBC06.3070502@HIDDEN>
X-Now-Playing: Severed Heads's _Gigapus_: "Cabbalaland (with M.C. Newsagent)"
Date: Mon, 10 May 2021 13:28:31 +0200
In-Reply-To: <565BBC06.3070502@HIDDEN> (Dmitry Gutov's message of "Mon, 30
 Nov 2015 05:01:26 +0200")
Message-ID: <87r1iesu8w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Dmitry Gutov <dgutov@HIDDEN> writes: > But we could try
 to simplify this semantics ("always runs at > point-max" is actually easier
 to reason about than "runs where the > previous code left off"). That kind
 of change seems too late for 2 [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 21067
Cc: Wolfgang Jenkner <wjenkner@HIDDEN>, 21067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Dmitry Gutov <dgutov@HIDDEN> writes:

> But we could try to simplify this semantics ("always runs at
> point-max" is actually easier to reason about than "runs where the
> previous code left off"). That kind of change seems too late for 25.1,
> though, and will require a review of the current vc-exec-after uses.

This was five years ago -- skimming this thread, I'm not quite sure what
the conclusion here was.  Is this something that should still be worked
on, or has this problem gone away in the meantime?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21067; Package emacs. Full text available.

Message received at 21067 <at> debbugs.gnu.org:


Received: (at 21067) by debbugs.gnu.org; 30 Nov 2015 03:01:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 29 22:01:50 2015
Received: from localhost ([127.0.0.1]:59947 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1a3Eir-0007PJ-Ti
	for submit <at> debbugs.gnu.org; Sun, 29 Nov 2015 22:01:50 -0500
Received: from mail-wm0-f48.google.com ([74.125.82.48]:38096)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <raaahh@HIDDEN>) id 1a3EiX-0007Or-Dq
 for 21067 <at> debbugs.gnu.org; Sun, 29 Nov 2015 22:01:47 -0500
Received: by wmec201 with SMTP id c201so120109049wme.1
 for <21067 <at> debbugs.gnu.org>; Sun, 29 Nov 2015 19:01:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-type:content-transfer-encoding;
 bh=CW1YdvASaMcVAWYcZOHPnVcMR3onA3wHsxRM8IVpTUs=;
 b=XP9XqZPiY59gGnsW64sihkGdVPa5upXVhQCN1Y4vbgFpkJtSAGQNJFNys5DP7TlwO2
 oqAZjvPnxDvoUD4EfC1BhcCuMQYi9Qcd6Dqnsnkxd+laNUfRG1qRajiTsuuyj3PgG7ul
 suR972AgrKgVS2Ub6RQSlI4CZjBVUlJrrdbQv2L5dGvDXMBuvRzOh6ZkvwKlTu/udAJc
 S4tE4RYw4nqG2eLjod4k0Y9CyXcWcmGaCnxrfZJDjMd26T1I4X5GP3XuYZ2ZoqGF8dy3
 0C/uzcxjRwFMhEkpj+HPsmCKmKtiHghbhKs6Cg0VLaNIkAALH09ai4dwwYeDzEatQPh4
 d83g==
X-Received: by 10.28.232.136 with SMTP id f8mr26952419wmi.1.1448852488714;
 Sun, 29 Nov 2015 19:01:28 -0800 (PST)
Received: from [192.168.1.2] ([185.105.175.24])
 by smtp.googlemail.com with ESMTPSA id q77sm19164599wmd.22.2015.11.29.19.01.27
 (version=TLSv1/SSLv3 cipher=OTHER);
 Sun, 29 Nov 2015 19:01:27 -0800 (PST)
Subject: Re: bug#21067: 25.0.50; [PATCH] With mercurial, vc-print-log puts
 point at eob
To: Wolfgang Jenkner <wjenkner@HIDDEN>
References: <85lheh8ekr.fsf@HIDDEN> <55AAEA7C.2060609@HIDDEN>
 <85380ludu0.fsf@HIDDEN> <55B2483B.4030909@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <565BBC06.3070502@HIDDEN>
Date: Mon, 30 Nov 2015 05:01:26 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101
 Thunderbird/42.0
MIME-Version: 1.0
In-Reply-To: <55B2483B.4030909@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 21067
Cc: 21067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

I was looking into applying your patch (except for the very last bit), 
because the idea of treating the asynchronous and synchronous delayed 
code basically seems right, but the current solution (using 
process-mark) will probably be inadequate in the synchronous case.

The semantics we seem to want to guarantee is that every delayed bit of 
code runs at the position the previous left off, but

(goto-char (or m (point-max)))

won't be sufficient, because that position is not necessarily point-max.

But we could try to simplify this semantics ("always runs at point-max" 
is actually easier to reason about than "runs where the previous code 
left off"). That kind of change seems too late for 25.1, though, and 
will require a review of the current vc-exec-after uses.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21067; Package emacs. Full text available.

Message received at 21067 <at> debbugs.gnu.org:


Received: (at 21067) by debbugs.gnu.org; 24 Jul 2015 14:14:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 24 10:14:26 2015
Received: from localhost ([127.0.0.1]:58046 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZIdk1-0004ch-HS
	for submit <at> debbugs.gnu.org; Fri, 24 Jul 2015 10:14:25 -0400
Received: from mail-wi0-f171.google.com ([209.85.212.171]:32827)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <raaahh@HIDDEN>) id 1ZIdjy-0004cY-8Q
 for 21067 <at> debbugs.gnu.org; Fri, 24 Jul 2015 10:14:23 -0400
Received: by wicmv11 with SMTP id mv11so66573161wic.0
 for <21067 <at> debbugs.gnu.org>; Fri, 24 Jul 2015 07:14:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-type:content-transfer-encoding;
 bh=3ceMwxtspnwRDCzzPcbMxpgBQXtxxY2MeIfb7Nlr914=;
 b=qzkXhXXyKWufmW9ibKEYyURsByF59Ofhph2Lv2mMXHLjeW8oEmZugiw4a/PieAYSpe
 uiTchHx0MC2lEDewu8zJe7f/UYAanWFwS3W4o+YGQeYN78ASsZsndAOKqPXnx1gB2DxE
 dmgXBZvCSsfpQZK6+xaKIZ/MoL9Z2xtw6cA8lLwx7TqBotPm/TJrP+1LKM47Uc0nq0TA
 Mv7qyz2rp3/yAYc0bvKm8PRwE1v7tFRbXs+ocKAesQiP0z9jRfIa53Ay3U6E5kBT4sAk
 iXl5kiLzliCLAm9P+EJX+QhYOdgxdlts6kbZdUHb2QCX/GNWtz75HXiuQ6bsQB8aH3jO
 jvGQ==
X-Received: by 10.180.186.34 with SMTP id fh2mr7883609wic.94.1437747261473;
 Fri, 24 Jul 2015 07:14:21 -0700 (PDT)
Received: from [192.168.0.185] (static-nbl2-118.cytanet.com.cy.
 [212.31.107.118])
 by smtp.googlemail.com with ESMTPSA id h9sm12859046wjx.20.2015.07.24.07.14.20
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 24 Jul 2015 07:14:20 -0700 (PDT)
Subject: Re: bug#21067: 25.0.50; [PATCH] With mercurial, vc-print-log puts
 point at eob
To: Wolfgang Jenkner <wjenkner@HIDDEN>
References: <85lheh8ekr.fsf@HIDDEN> <55AAEA7C.2060609@HIDDEN>
 <85380ludu0.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <55B2483B.4030909@HIDDEN>
Date: Fri, 24 Jul 2015 17:14:19 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
 Thunderbird/38.0
MIME-Version: 1.0
In-Reply-To: <85380ludu0.fsf@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 21067
Cc: 21067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

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

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

Actually, it's still a problem if the repository history is small.

It seems that if the log can be delivered in one chunk, then point still 
ends at the end of the buffer (if someone can't reproduce it 
immediately, try a new repo with a few commits, and if that doesn't 
reproduce, press `g' a few times).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21067; Package emacs. Full text available.

Message received at 21067 <at> debbugs.gnu.org:


Received: (at 21067) by debbugs.gnu.org; 19 Jul 2015 18:05:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 19 14:05:09 2015
Received: from localhost ([127.0.0.1]:53934 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZGsxY-0006ll-MF
	for submit <at> debbugs.gnu.org; Sun, 19 Jul 2015 14:05:08 -0400
Received: from mail-wg0-f52.google.com ([74.125.82.52]:33344)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <raaahh@HIDDEN>) id 1ZGsxW-0006lE-Es
 for 21067 <at> debbugs.gnu.org; Sun, 19 Jul 2015 14:05:06 -0400
Received: by wgmn9 with SMTP id n9so115623491wgm.0
 for <21067 <at> debbugs.gnu.org>; Sun, 19 Jul 2015 11:05:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-type:content-transfer-encoding;
 bh=KY35RYHlCnqfKezQrfOHTl2K4t+B0tfiiqKgvKTls2w=;
 b=Wpl5x/j3W6nXLizRY9YMP84R9/A79rV8nwfAT3dXiv3dSX8qczjG2c4c2n8GBByrxK
 HibkhfkhKP3/SxpKfr7e1X26QcQ7fxIzlDf89Ns70wxO4wWlSn1bbdzsBa/onsOQzdD/
 hQNrQbY/yntSNiFhmi/LiC2SSLzXD7uUO8m/AfmHlchgRfVKphFw6YVQRNbfkIeiWjXD
 BPOcbuKD22eUoWW699dnNS172q/CPEZqBEa/BEbEFxiZ5fdDLIutxZcHLS0b4Swx410A
 aXOfAwBHQkpFUuoqpSR6H02RewBOrZjCi3xXVi2v+v4ntLwjW0wklbjBzegWhAwYvQ5h
 h5Yw==
X-Received: by 10.180.95.67 with SMTP id di3mr14073455wib.78.1437329100943;
 Sun, 19 Jul 2015 11:05:00 -0700 (PDT)
Received: from [192.168.1.2] ([185.105.175.24])
 by smtp.googlemail.com with ESMTPSA id e2sm28147953wjw.12.2015.07.19.11.04.59
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 19 Jul 2015 11:04:59 -0700 (PDT)
Subject: Re: bug#21067: 25.0.50; [PATCH] With mercurial, vc-print-log puts
 point at eob
To: Wolfgang Jenkner <wjenkner@HIDDEN>
References: <85lheh8ekr.fsf@HIDDEN> <55AAEA7C.2060609@HIDDEN>
 <85380ludu0.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <55ABE6C8.9040603@HIDDEN>
Date: Sun, 19 Jul 2015 21:04:56 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
 Thunderbird/38.0
MIME-Version: 1.0
In-Reply-To: <85380ludu0.fsf@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 21067
Cc: 21067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

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

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

I've applied the patch to vc-hg-print-log, but a lot of older backends 
(mtn, sccs, and also src) still use the synchronous calls there.

Some even seem to do that on purpose (cvs and mcvs), choosing between 
async and sync at runtime. I don't know why, so I'm hesitant to change 
all of them.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21067; Package emacs. Full text available.

Message received at 21067 <at> debbugs.gnu.org:


Received: (at 21067) by debbugs.gnu.org; 19 Jul 2015 11:05:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 19 07:05:20 2015
Received: from localhost ([127.0.0.1]:53571 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZGmPI-0003qp-3N
	for submit <at> debbugs.gnu.org; Sun, 19 Jul 2015 07:05:20 -0400
Received: from mail-wg0-f44.google.com ([74.125.82.44]:36410)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <raaahh@HIDDEN>) id 1ZGmPE-0003qb-Av
 for 21067 <at> debbugs.gnu.org; Sun, 19 Jul 2015 07:05:17 -0400
Received: by wgbcc4 with SMTP id cc4so17995602wgb.3
 for <21067 <at> debbugs.gnu.org>; Sun, 19 Jul 2015 04:05:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-type:content-transfer-encoding;
 bh=kdE73L8oLkKbw4izYfK3Ic4qFbRqKKsMc4dDi5SJPpo=;
 b=QBrLzzISnzfCs5RVYcP++7CymE1OKpKA7WVFBQsp6vz0mc1jMSUWwQke8PDl44r6Tu
 8/EC3CY5HgOWI3/oj5Nj2j3n/xfvcDjJWRMJBbItJGouamUeQKbR1HNIuBYU6i9LqNb4
 BaWn2Iy170+YhAX5U9/atFM3qCBNZ8XD1X9q+PzlQFO926ekIlh2NsmV+zEI7R43PZn/
 gr36LoKZT5NoFEHZ/DiveIX+mujq2az8yVoH7neJhooZ78yc6RUnLGfA6YMKI83KcRAD
 abJ//of+eqwZfa7weevONwIUysIs2gBKHHfCtZtuvW9vl4AXMWAbUGKtfnbeVh3V6Xvj
 DGyg==
X-Received: by 10.180.218.195 with SMTP id pi3mr11802994wic.71.1437303910730; 
 Sun, 19 Jul 2015 04:05:10 -0700 (PDT)
Received: from [192.168.1.2] ([185.105.175.24])
 by smtp.googlemail.com with ESMTPSA id ez4sm6539982wid.14.2015.07.19.04.05.08
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 19 Jul 2015 04:05:09 -0700 (PDT)
Subject: Re: bug#21067: 25.0.50; [PATCH] With mercurial, vc-print-log puts
 point at eob
To: Wolfgang Jenkner <wjenkner@HIDDEN>
References: <85lheh8ekr.fsf@HIDDEN> <55AAEA7C.2060609@HIDDEN>
 <85380ludu0.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <55AB8460.6080707@HIDDEN>
Date: Sun, 19 Jul 2015 14:05:04 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
 Thunderbird/38.0
MIME-Version: 1.0
In-Reply-To: <85380ludu0.fsf@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 21067
Cc: 21067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21067; Package emacs. Full text available.

Message received at 21067 <at> debbugs.gnu.org:


Received: (at 21067) by debbugs.gnu.org; 19 Jul 2015 01:38:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 18 21:38:10 2015
Received: from localhost ([127.0.0.1]:53443 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZGdYQ-000744-9S
	for submit <at> debbugs.gnu.org; Sat, 18 Jul 2015 21:38:10 -0400
Received: from b2bfep12.mx.upcmail.net ([62.179.121.57]:39945)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <xdsl0000474440@HIDDEN>) id 1ZGdYM-00073W-TP
 for 21067 <at> debbugs.gnu.org; Sat, 18 Jul 2015 21:38:07 -0400
Received: from edge11.upcmail.net ([192.168.13.81]) by b2bfep12.mx.upcmail.net
 (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP
 id <20150719013800.OBBC24118.b2bfep12-int.chello.at@HIDDEN>
 for <21067 <at> debbugs.gnu.org>; Sun, 19 Jul 2015 03:38:00 +0200
Received: from iznogoud.viz ([91.119.138.18]) by edge11.upcmail.net with edge
 id u1dz1q00g0Q06mr0B1dzrQ; Sun, 19 Jul 2015 03:38:00 +0200
X-SourceIP: 91.119.138.18
Received: from wolfgang by iznogoud.viz with local (Exim 4.85 (FreeBSD))
 (envelope-from <wolfgang@HIDDEN>)
 id 1ZGdYF-0000tQ-9T; Sun, 19 Jul 2015 03:37:59 +0200
From: Wolfgang Jenkner <wjenkner@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#21067: 25.0.50;
 [PATCH] With mercurial, vc-print-log puts point at eob
Date: Sun, 19 Jul 2015 03:36:38 +0200
References: <85lheh8ekr.fsf@HIDDEN> <55AAEA7C.2060609@HIDDEN>
Message-ID: <85380ludu0.fsf@HIDDEN>
User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 21067
Cc: 21067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

On Sun, Jul 19 2015, Dmitry Gutov wrote:

> 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.

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 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.

So, I'd rather just accept that the synchronous and asynchronous case
behave in different ways and scrap my proposed patch.

Thanks for pointing out this example.

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

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






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21067; Package emacs. Full text available.

Message received at 21067 <at> debbugs.gnu.org:


Received: (at 21067) by debbugs.gnu.org; 19 Jul 2015 00:08:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 18 20:08:41 2015
Received: from localhost ([127.0.0.1]:53413 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZGc9p-0001qu-2A
	for submit <at> debbugs.gnu.org; Sat, 18 Jul 2015 20:08:41 -0400
Received: from mail-wg0-f51.google.com ([74.125.82.51]:36847)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <raaahh@HIDDEN>) id 1ZGc9m-0001qd-Pt
 for 21067 <at> debbugs.gnu.org; Sat, 18 Jul 2015 20:08:39 -0400
Received: by wgbcc4 with SMTP id cc4so12912974wgb.3
 for <21067 <at> debbugs.gnu.org>; Sat, 18 Jul 2015 17:08:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:subject:to:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-type:content-transfer-encoding;
 bh=tp1+XgNOwq6lgbaKN0EfeJSy1WoxK0bQKXvGWDvW2BM=;
 b=HJRHRLy7wLt2riYUz5LRC+ECOEo6oF//QK3WvEQaUD5K50fRISWFAB6A1acMqUjB5k
 aAsRcH4kdAzDPzNtPdDTD1DDCospMvzBFBuuuWWX8WXV60gMQxaQqSWDmtqGphWHHHi7
 Fwb98oW2C2kWqUHUajVAbY/1jk+WlijIoJaIIUtDgLsI4y4l/RFLJ5rtEZXItu38lO0A
 ZtkSOESWjUQDI/GYzYNzegv4Uzr8SMg6oebwJxsUi2Cg/9Y0pw3M+T9d1IV1HQN94KN4
 VsTIaRCPWq49tMXyJWfO/YFHK5NLbTdRp2WTAekD9TD4LhQEJmAVoHU9mHXhIiS+qYnM
 Zyxw==
X-Received: by 10.180.9.6 with SMTP id v6mr8370993wia.83.1437264513282;
 Sat, 18 Jul 2015 17:08:33 -0700 (PDT)
Received: from [192.168.1.2] ([185.105.175.24])
 by smtp.googlemail.com with ESMTPSA id k2sm4767123wif.4.2015.07.18.17.08.31
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 18 Jul 2015 17:08:32 -0700 (PDT)
Subject: Re: bug#21067: 25.0.50; [PATCH] With mercurial, vc-print-log puts
 point at eob
To: Wolfgang Jenkner <wjenkner@HIDDEN>, 21067 <at> debbugs.gnu.org
References: <85lheh8ekr.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <55AAEA7C.2060609@HIDDEN>
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
MIME-Version: 1.0
In-Reply-To: <85lheh8ekr.fsf@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 21067
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

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))
      (with-current-buffer
  	buffer
-      (apply 'vc-hg-command buffer 0 files "log"
+      (apply 'vc-hg-command buffer 'async files "log"
  	     (nconc
  	      (when start-revision (list (format "-r%s:0" start-revision)))
  	      (when limit (list "-l" (format "%s" limit)))





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21067; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Jul 2015 18:24:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 15 14:24:14 2015
Received: from localhost ([127.0.0.1]:50335 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZFRLp-00038i-N4
	for submit <at> debbugs.gnu.org; Wed, 15 Jul 2015 14:24:14 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49317)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <xdsl0000474440@HIDDEN>) id 1ZFRLm-00038U-N7
 for submit <at> debbugs.gnu.org; Wed, 15 Jul 2015 14:24:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <xdsl0000474440@HIDDEN>) id 1ZFRLg-0003nW-Dl
 for submit <at> debbugs.gnu.org; Wed, 15 Jul 2015 14:24:05 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: **
X-Spam-Status: No, score=2.3 required=5.0 tests=BAYES_50,DATE_IN_PAST_06_12
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:57370)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <xdsl0000474440@HIDDEN>) id 1ZFRLg-0003nQ-Au
 for submit <at> debbugs.gnu.org; Wed, 15 Jul 2015 14:24:04 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34549)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <xdsl0000474440@HIDDEN>) id 1ZFRLb-0000GJ-KL
 for bug-gnu-emacs@HIDDEN; Wed, 15 Jul 2015 14:24:04 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <xdsl0000474440@HIDDEN>) id 1ZFRLV-0003j0-Fm
 for bug-gnu-emacs@HIDDEN; Wed, 15 Jul 2015 14:23:59 -0400
Received: from b2bfep13.mx.upcmail.net ([62.179.121.58]:35355)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <xdsl0000474440@HIDDEN>) id 1ZFRLV-0003h7-5J
 for bug-gnu-emacs@HIDDEN; Wed, 15 Jul 2015 14:23:53 -0400
Received: from edge11.upcmail.net ([192.168.13.81]) by b2bfep13.mx.upcmail.net
 (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP
 id <20150715182349.YLRK2939.b2bfep13-int.chello.at@HIDDEN>
 for <bug-gnu-emacs@HIDDEN>; Wed, 15 Jul 2015 20:23:49 +0200
Received: from iznogoud.viz ([91.119.221.196]) by edge11.upcmail.net with edge
 id siPp1q0084EqxsT0BiPpjU; Wed, 15 Jul 2015 20:23:49 +0200
X-SourceIP: 91.119.221.196
Received: from wolfgang by iznogoud.viz with local (Exim 4.85 (FreeBSD))
 (envelope-from <wolfgang@HIDDEN>) id 1ZFRLQ-0002NZ-SU
 for bug-gnu-emacs@HIDDEN; Wed, 15 Jul 2015 20:23:48 +0200
From: Wolfgang Jenkner <wjenkner@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 25.0.50; [PATCH] With mercurial, vc-print-log puts point at eob
Date: Wed, 15 Jul 2015 13:09:22 +0200
Message-ID: <85lheh8ekr.fsf@HIDDEN>
User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -3.9 (---)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.9 (---)

Call vc-dir for some repo under hg version control and then type l in
the resulting *vc-dir* buffer.

As expected, this produces a *vc-change-log* buffer with the most recent
change at the beginning.  However, point is at the end of the buffer.
I would expect point to be put next to the most recent commit, as it is
the case for, e.g., git.  Note that explicitly selecting a revision
(typing C-u l) does work.

The different behaviour is due to the hg log subprocess being run
synchronously while the git subprocess is run asynchronously.

For an async process the following happens:

vc-process-filter inserts each output chunk at the process mark and
updates the latter; vc-run-delayed has advised the sentinel to go to the
process mark and insert additional stuff (buttons) when the process is
finished.  All those insertions happen inside save-excursion forms.
However, the sentinel sets point to the value of vc-sentinel-movepoint
(if non-nil).

For a sync process the following happens:

The output is inserted and additional stuff set up with vc-run-delayed
is inserted at point.  Those insertions don't happen inside
save-excursion forms and vc-sentinel-movepoint is ignored.

Now, while it is true that the name of vc-sentinel-movepoint doesn't
sound like it was meant for synchronous processes anyway, it is also
true that generic functions like vc-print-log and callees don't know
whether the subprocess will be run synchronously or asynchronously.

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).

Here's a patch.

-- >8 --
Subject: [PATCH] Handle point for sync vc processes like for async ones

* lisp/vc/vc-dispatcher.el (vc--process-sentinel): Cut some code.
(vc-exec-after): Move it here.  Remove comment which has not been
matching the code for a while.
(vc-do-command): Use save-excursion around the sync process call.
---
 lisp/vc/vc-dispatcher.el | 39 ++++++++++++++++++---------------------
 1 file changed, 18 insertions(+), 21 deletions(-)

diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index ec55867..4f44d35 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -199,25 +199,7 @@ Another is that undo information is not kept."
                 ;; Leave mode-line uncluttered, normally.
                 (unless (eq 'exit status)
                   (format " (%s)" status))))
-        (let (vc-sentinel-movepoint
-              (m (process-mark p)))
-          ;; Normally, we want async code such as sentinels to not move point.
-          (save-excursion
-            (goto-char m)
-            ;; Each sentinel may move point and the next one should be run
-            ;; at that new point.  We could get the same result by having
-            ;; each sentinel read&set process-mark, but since `cmd' needs
-            ;; to work both for async and sync processes, this would be
-            ;; difficult to achieve.
-            (vc-exec-after code)
-            (move-marker m (point)))
-          ;; But sometimes the sentinels really want to move point.
-          (when vc-sentinel-movepoint
-	    (let ((win (get-buffer-window (current-buffer) 0)))
-	      (if (not win)
-		  (goto-char vc-sentinel-movepoint)
-		(with-selected-window win
-		  (goto-char vc-sentinel-movepoint))))))))))
+        (vc-exec-after code)))))
 
 (defun vc-set-mode-line-busy-indicator ()
   (setq mode-line-process
@@ -241,7 +223,20 @@ CODE should be a function of no arguments."
      ((or (null proc) (eq (process-status proc) 'exit))
       ;; Make sure we've read the process's output before going further.
       (when proc (accept-process-output proc))
-      (if (functionp code) (funcall code) (eval code)))
+      (let (vc-sentinel-movepoint)
+        ;; Normally, we want code to not move point.
+        (save-excursion
+          (let ((m (when proc (process-mark proc))))
+            (goto-char (or m (point-max)))
+            (if (functionp code) (funcall code) (eval code))
+            (when m (move-marker m (point)))))
+        ;; But sometimes the sentinels really want to move point.
+        (when vc-sentinel-movepoint
+          (let ((win (get-buffer-window (current-buffer) 0)))
+            (if (not win)
+                (goto-char vc-sentinel-movepoint)
+              (with-selected-window win
+                (goto-char vc-sentinel-movepoint)))))))
      ;; If a process is running, add CODE to the sentinel
      ((eq (process-status proc) 'run)
       (vc-set-mode-line-busy-indicator)
@@ -337,7 +332,9 @@ case, and the process object in the asynchronous case."
 	    (when vc-command-messages
 	      (message "Running %s in foreground..." full-command))
 	    (let ((buffer-undo-list t))
-	      (setq status (apply 'process-file command nil t nil squeezed)))
+              ;; Use `save-excursion' like `vc-process-filter' does.
+	      (setq status (save-excursion
+                             (apply 'process-file command nil t nil squeezed))))
 	    (when (and (not (eq t okstatus))
 		       (or (not (integerp status))
 			   (and okstatus (< okstatus status))))
-- 
2.4.5





Acknowledgement sent to Wolfgang Jenkner <wjenkner@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#21067; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 10 May 2021 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.