From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ben Gamari Newsgroups: gmane.emacs.bugs Subject: bug#21559: [PATCH] autorevert: Wait a while before calling vc-find-file-hook Date: Wed, 28 Oct 2015 18:05:51 +0100 Message-ID: <8737wux6s0.fsf@smart-cactus.org> References: <1445885018-17451-1-git-send-email-ben@smart-cactus.org> <1445885018-17451-2-git-send-email-ben__31073.4246545055$1445885089$gmane$org@smart-cactus.org> <87fv0wogyx.fsf@gmx.de> <87a8r3w6dw.fsf@smart-cactus.org> <87k2q7127u.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1446051989 2505 80.91.229.3 (28 Oct 2015 17:06:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Oct 2015 17:06:29 +0000 (UTC) Cc: 21559@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 28 18:06:17 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZrUAy-0007iV-WA for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Oct 2015 18:06:17 +0100 Original-Received: from localhost ([::1]:39486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrUAy-0007Qn-Kg for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Oct 2015 13:06:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrUAq-0007QX-8k for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 13:06:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrUAl-0005aT-9V for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 13:06:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrUAl-0005aN-54 for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 13:06:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZrUAk-0007Mj-IL for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 13:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ben Gamari Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Oct 2015 17:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21559 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21559-submit@debbugs.gnu.org id=B21559.144605196128306 (code B ref 21559); Wed, 28 Oct 2015 17:06:02 +0000 Original-Received: (at 21559) by debbugs.gnu.org; 28 Oct 2015 17:06:01 +0000 Original-Received: from localhost ([127.0.0.1]:42769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrUAj-0007MU-4I for submit@debbugs.gnu.org; Wed, 28 Oct 2015 13:06:01 -0400 Original-Received: from mail.smart-cactus.org ([54.187.36.80]:41689) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrUAh-0007MM-Hu for 21559@debbugs.gnu.org; Wed, 28 Oct 2015 13:06:00 -0400 Original-Received: from localhost.localdomain (HSI-KBW-149-172-43-78.hsi13.kabel-badenwuerttemberg.de [149.172.43.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: ben@smart-cactus.org) by mail.smart-cactus.org (Postfix) with ESMTPSA id 37F32434FC; Wed, 28 Oct 2015 16:54:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.smart-cactus.org; s=mail; t=1446051258; bh=xcJ1eg5wfGlv/qLZhBtK86P7/SALYKOdJ6mZ3P2ms8o=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=YZJjURjqWvGtmlQV/v0DonWTHLCyzqBAZ1l8iRI19U34W4xdsQ+dphUrHOXzq87WY qLa7ZbtUzzugTL9RzDZsiZ1PVq00Rzxi5FOcRcXmXDGgpd48leTpGZOawexB/G0+te Go+KkAgGGG6/ct5uii9b/CQtRqw2M7IoHPhehMT4= In-Reply-To: <87k2q7127u.fsf@gmx.de> User-Agent: Notmuch/0.21~rc3+6~g4acbc1f (http://notmuchmail.org) Emacs/25.0.50.1 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:108110 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Michael, Michael Albinus writes: >>> Have you considered another solution, maybe by providing vc(-git) >>> specific buffer-stale-function and revert-buffer? This would be much >>> more in the spirit how autorevert is supposed to work. And this would >>> simplify maintenance, >> >> Could you perhaps describe in a bit detail what the semantics of these >> functions would be? I'm not entirely sure I understand what you are >> proposing. > > As starting point you might read about `revert-buffer-function' in=20 > (info "(elisp)Reverting") and about `buffer-stale-function' in > (info "(emacs)Supporting additional buffers") > > See also in a dired buffer the values for both variables, and how the > functions work for dired. Thanks for the references. I now have a better idea of what you are proposing. I do, however, fear that your solution might be too large a hammer for the problem at hand. Ultimately the problem here is an annoyingly narrow one, namely the fact that auto-revert's action is correlated with file modifications due to rebasing. For this reason I think it may be best to keep the solution confined to auto-revert. In particular, I'm afraid that the changing the semantics of revert-buffer may break other users of this function who expect its effect to be apparent immediately after invocation. It seems like this approach may easily and unwittingly trade one subtle form of breakage for another (even harder to find) one. Cheers, =2D Ben --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWMQBvAAoJEHPt6ejPuu8BOOIIAJuhTbtouG13Ko3EB59FDXir OrV5czU+jxEKXG+pbVyj+o6AsXXuGYRl/ywthbMfY09DdoIThdDM/MhhdT+XZ6Dh ysClbw2Y69rI8sYyOAyIrxCKABSocD2DyBRtJb2AaNRnyGeUEfoKyY9r/luBRYEz kepX32Rf29ZE2nlH2E6ABUBQANd699lhRo71zvBNeXwISd0nu0DTqHKapnhOIReR msGHXMX4LWCxGyBQ9/oH9+JJwd9OXVjCNb1D/+GGBkns8dB/Jw9qWnpeG/1HJxfG THIjcJWf/uRt8AbsAQ22S1OoZttzYTkIa8RO6WKpMEYFLb2WaYj7JamhYyocJPM= =qo2o -----END PGP SIGNATURE----- --=-=-=--