bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#69220: [PATCH] smerge-mode: add a function to resolve all conflicts


From: Konstantin Kharlamov
Subject: bug#69220: [PATCH] smerge-mode: add a function to resolve all conflicts in a file
Date: Mon, 19 Feb 2024 20:25:53 +0300
User-agent: Evolution 3.50.3

On Mon, 2024-02-19 at 10:31 -0500, Stefan Monnier wrote:
> > I use SMerge quite a lot, but never yet had a situation where the
> > same
> > resolution was applicable to all of the conflicts, let alone knew
> > that
> > in advance, before looking at each conflict.
> 
> Yeah, I'm not sure we need this.
> 
> It would be easy enough to provide a kind of prefix command
> `smerge-apply-all-conflicts` which reads the next key and calls the
> corresponding command in every conflict in the file.
> It would generalize `smerge-resolve-all`.

Sorry, I'm not sure I understand… đŸ˜… You want a function `smerge-apply-
all-conflicts` that would accept a prefix command instead of an
explicit parameter? If so, that would be almost the same as what I did,
except with non-intuitive usability. Or I misunderstand something.

> I have needed such a thing in the past, but there are several ways to
> do
> that already: beside telling Git beforehand how to resolve the
> conflicts, you can also use things like
> 
>     C-x ( C-c ^ n C-c ^ u C-x e e e e e e e e e

I fear to even try to decypher that combination. For the record, I have
lots of commands that I use situationally, but I do not care to
remember their bindings because it's easier to just call `M-x` and get
a smex menu with "last history" that fuzzily autocompletes by typing a
few characters.

As an example: I have no idea what binding a `smerge-vc-next-conflict`
has; more over, I don't even remember the full name of this function. I
just type `M-x next-con` or `M-x confli` and it pops up as the most
recent command with that infix.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]