|
From: | Konstantin Kharlamov |
Subject: | bug#34420: [PATCH 2/2] smerge-mode: new function to go to next conflict |
Date: | Sun, 17 Feb 2019 12:18:53 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 16.02.2019 16:41, Stefan Monnier wrote:
To give some context: these patches follow this thread http://lists.gnu.org/archive/html/help-gnu-emacs/2019-01/msg00111.html (note: the thread continues the next month, i.e. February, too).I hope Stefan (CC'ed) could comment on those.Hmm... In terms of implementation, there's nothing very deep and it looks OK (tho maybe it points to the need to autoload vc-find-conflicted-file, and obviously I'd use (point-min) rather than a hardcoded 0 and change the docstring to use the imperative rather than present tense).
Thanks for your comments!
In terms of UI it's a question of taste: I didn't provide such a command because I never felt the need for it (I think I like to be in control of changing buffer). Maybe I'd change it to first emit a warning "no more conflicts in this buffer" and only go to the next buffer if you repeat the command (as a form of confirmation that you're done with the current buffer).
Well, I wouldn't call changing a buffer upon explicit command from a user a "taking control from them". The command name being explicit (at least should be — I'm not a native English speaker, please tell me if it's not) about going to the next conflict in the repository, and conflicts are markers in different files.
Emitting a warning in this case would be annoying, because the user expects to be taken to the next conflict if there's any. Imagine the case with many files having one small conflict, and that the user have to press "take me to the next conflict" twice every time.
Okay, I can add that. I can't really comment anything about usability in this case, because I have a habit of saving files myself way too often :)Also, I'd save the file before switching to the next buffer.
------Since this discussion may take time, and you even may not even like the change — please, could you push the first patch in the series? When I first started looking at smerge-mode.el, I was confused about how going to the next conflict is implemented, and why the code does not call `smerge-next` anywhere. Extracting the code to an inline function, I think, should make it a bit easier for future contributors.
[Prev in Thread] | Current Thread | [Next in Thread] |