From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#11605: 24.1.50; vc-ediff revert annoyance Date: Wed, 24 Feb 2016 17:33:44 +1100 Message-ID: <87twkybos7.fsf@gnus.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456295724 19397 80.91.229.3 (24 Feb 2016 06:35:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Feb 2016 06:35:24 +0000 (UTC) Cc: 11605@debbugs.gnu.org To: William Xu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 24 07:35:11 2016 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 1aYT2V-0007Xd-4A for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Feb 2016 07:35:11 +0100 Original-Received: from localhost ([::1]:33868 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYT2U-0004FM-Bw for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Feb 2016 01:35:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYT2R-0004ED-Mj for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2016 01:35:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYT2M-0006Ge-Km for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2016 01:35:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYT2M-0006GO-Hi for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2016 01:35:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aYT2M-0002Hs-DZ for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2016 01:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Feb 2016 06:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11605 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch confirmed Original-Received: via spool by 11605-submit@debbugs.gnu.org id=B11605.14562956608717 (code B ref 11605); Wed, 24 Feb 2016 06:35:02 +0000 Original-Received: (at 11605) by debbugs.gnu.org; 24 Feb 2016 06:34:20 +0000 Original-Received: from localhost ([127.0.0.1]:42363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYT1g-0002GX-7h for submit@debbugs.gnu.org; Wed, 24 Feb 2016 01:34:20 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:40965) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYT1e-0002GP-Sw for 11605@debbugs.gnu.org; Wed, 24 Feb 2016 01:34:19 -0500 Original-Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aYT1B-0003Oz-17; Wed, 24 Feb 2016 07:33:49 +0100 In-Reply-To: (William Xu's message of "Sat, 2 Jun 2012 12:31:10 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aYT1B-0003Oz-17 MailScanner-NULL-Check: 1456900432.28124@OBIBVpdNjrMn+MrORa2sKw X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:113683 Archived-At: William Xu writes: > 1. emacs -Q > 2. visit a version controlled file, say `foo'. > 3. M-x vc-ediff, run it couple of times. > > You will see this annoying message many times: > > File foo.~master~ changed on disk. Reread from disk? (yes or no) I can confirm that this bug is still present in the Emacs trunk. > The reason is the ~master~ file is checked out everytime we run > vc-ediff, and after ediff session, the ~master~ buffer is always left > there, hence, when running vc-ediff multiple times it constantly asks > you whether you want to revert. Why not let it revert automatically? > > How about this patch? [...] I think the patch sounds reasonable, but the vc machinery is something with which I'm not overly familiar. Could somebody take a peek at this patch? > From d2af0f4dcc81b39d9360135244d6870388a264a3 Mon Sep 17 00:00:00 2001 > From: William Xu > Date: Sat, 2 Jun 2012 12:16:45 +0800 > Subject: [PATCH] (vc-find-revision): Auto revert file revision buffer > quietly. > > --- > lisp/vc/vc.el | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el > index 87e4e1c..bd337d0 100644 > --- a/lisp/vc/vc.el > +++ b/lisp/vc/vc.el > @@ -1815,11 +1815,13 @@ Use BACKEND as the VC backend if specified." > (delete-file filename)))) > (vc-mode-line file)) > (message "Checking out %s...done" filename))) > - (let ((result-buf (find-file-noselect filename))) > + (let ((result-buf (or (get-file-buffer filename) > + (find-file-noselect filename)))) > (with-current-buffer result-buf > ;; Set the parent buffer so that things like > ;; C-x v g, C-x v l, ... etc work. > - (set (make-local-variable 'vc-parent-buffer) filebuf)) > + (set (make-local-variable 'vc-parent-buffer) filebuf) > + (revert-buffer nil t)) > result-buf))) > > ;; Header-insertion code -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no