GNU bug report logs - #46876
[PATCH] Find conflict markers in opened buffers as well

Previous Next

Package: emacs;

Reported by: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>

Date: Tue, 2 Mar 2021 16:25:02 UTC

Severity: normal

Tags: patch

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #22 received at 46876-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>, 46876-done <at> debbugs.gnu.org
Subject: Re: bug#46876: [PATCH] Find conflict markers in opened buffers as well
Date: Tue, 9 Mar 2021 04:51:00 +0200
On 02.03.2021 21:40, Konstantin Kharlamov wrote:
> Call to (vc-find-conflicted-file) will only result in jump to a conflict
> marker when file is a newly opened one. When a file is already open in
> Emacs, (vc-find-conflicted-file) only switches to that buffer, so we
> need to explicitly jump to a conflict marker.
> 
> * lisp/vc/smerge-mode.el (smerge-vc-next-conflict): Search for a
> conflict marker if call to (vc-find-conflicted-file) haven't resulted in
> a jump to one. And remove `buffer` variable that becomes unused.

Thank you, this makes sense. Applied and pushed to master.

This part is suboptimal:

> When a file is already open in
> Emacs, (vc-find-conflicted-file) only switches to that buffer

...and I had to spend some time figuring out why that happens (hint: 
vc-git-find-file-hook), and that kind of unpredictable behavior is Not 
Good(tm).

I don't have an alternative fix to propose, though. At least not at this 
time.




This bug report was last modified 4 years and 70 days ago.

Previous Next


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