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


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Konstantin Kharlamov <hi-angel <at> yandex.ru>, 46876-done <at> debbugs.gnu.org
Subject: bug#46876: [PATCH] Find conflict markers in opened buffers as well
Date: Tue, 9 Mar 2021 16:15:02 +0200
On 09.03.2021 08:32, Konstantin Kharlamov wrote:

>> 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).
> 
> Back when I stumbled upon this behaviour, I didn't research into it because I thought it could be deliberate. The reasoning might have been: if you didn't have a file opened, it doesn't really matter where your point would be once it is. So it shouldn't hurt to just jump to a conflict marker, and so it does. On the other hand, if you did have the file opened, you might not want to lose position of your point (for example, you could have a selection, which you don't want to lose for some reason), IOW initial point position in this case might matter.
> 
> I'm just speculating though, I do not know if it's true, neither I remember having a usecase as the one I imagine it's trying to cover. FWIW, usually when I want to save positions in a buffer, I use (evil-set-marker) from Evil package.

I don't use Evil, but set-mark should work.

In any case, when the user is calling vc-find-conflicted-file, they 
probably want to either always go to the conflict markers (whether the 
file has been visited or not), or never. And "always" probably makes 
more sense.

It's not urgent, though, especially with neither command having a 
default binding.




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.