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

From: Konstantin Kharlamov <[email-masked]>
Date: Tue, 20 Feb 2024 06:40:01 +0300

On Tue, 2024-02-20 at 06:24 +0300, Konstantin Kharlamov wrote:
> On Mon, 2024-02-19 at 22:15 -0500, Stefan Monnier wrote:
> > > > No: `smerge-apply-all-conflicts` would *be* the prefix command.
> > > > Instead of a prefix `C-u 8` which causes the next command to be
> > > > executed 8 times, your use `M-x smerge-apply-all-conflicts` to
> > > > cause
> > > > the next command to be applied to every conflict in the buffer.
> > [...]
> > > I think I see, so you suggest a function that would apply
> > > resolution to
> > > the next N conflicts.
> > 
> > No, that's not what I'm suggesting.  If you re-read the above I say
> > "applied to every conflict in the buffer" (rather than some
> > specific
> > N),
> > and I don't say "resolve" or anything like "resolution".
> > 
> > It's really doing the same as your patch, except that the command
> > to
> > apply at each iteration is not limited to one of
> > `smerge-keep-(upper/base/lower)` (and that it's specified by
> > hitting
> > the
> > command's key binding rather than by choosing a string in the
> > minibuffer).
> 
> Sorry, I'm not following 😅 The closest thing I see is you want a
> prefix to each of smerge-keep-(upper/base/lower) commands to be
> added,
> so that pressing a `C-u 0 smerge-keep-upper` would call the command
> for
> each conflict in the buffer. But that seems both less discoverable
> and
> more code to implement. But maybe I understood you wrong.

Aaah, I think I get it. You want a command that would iterate through
conflicts and ask a user which solution side to apply?