GNU bug report logs - #11605
24.1.50; vc-ediff revert annoyance

Previous Next

Package: emacs;

Reported by: William Xu <william.xwl <at> gmail.com>

Date: Sat, 2 Jun 2012 04:34:02 UTC

Severity: normal

Tags: confirmed

Found in version 24.1.50

Done: Sean Whitton <spwhitton <at> spwhitton.name>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 11605 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: William Xu <william.xwl <at> gmail.com>, 11605 <at> debbugs.gnu.org
Subject: Re: bug#11605: 24.1.50; vc-ediff revert annoyance
Date: Fri, 26 Feb 2016 16:31:47 +1030
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> On 02/24/2016 08:33 AM, Lars Ingebrigtsen wrote:
>
>>> @@ -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))))
>
> Doesn't find-file-noselect call get-file-buffer anyway?

It does, but then it goes into all the "File %s changed on disk.  Reread
from disk?" stuff, which is what the bug is about.  But, I mean, the
file may have changed, so...

>>>        (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))
>
> It seems like this might conflict with other uses of vc-find-revision,
> like vc-revision-other-window. Where the user is allowed to change the
> contents of the returned buffer, and might've done so before we do
> this automatic silent revert.
>
> Maybe do it on ediff's side instead?

If the buffer with the comparison file had been killed before all this
had happened, we wouldn't have gotten the "file changed on disk" thing,
yes...  That may be a better fix.

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




This bug report was last modified 82 days ago.

Previous Next


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