From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#69220: [PATCH] smerge-mode: add a function to resolve all conflicts in a file Date: Tue, 20 Feb 2024 06:40:01 +0300 Message-ID: <19beac5b9be5696e57c4d8e3759990ef9d04ae69.camel@yandex.ru> References: <865xykr79f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15860"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.50.3 Cc: Eli Zaretskii , 69220@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 20 04:41:03 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rcH09-0003t9-WE for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Feb 2024 04:41:02 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcGzx-0003eG-Ov; Mon, 19 Feb 2024 22:40:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rcGzq-0003dh-9G for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 22:40:44 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rcGzo-0008JT-Uq for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 22:40:42 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rcH0A-00078L-Br for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 22:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2024 03:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69220 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 69220-submit@debbugs.gnu.org id=B69220.170840043327364 (code B ref 69220); Tue, 20 Feb 2024 03:41:02 +0000 Original-Received: (at 69220) by debbugs.gnu.org; 20 Feb 2024 03:40:33 +0000 Original-Received: from localhost ([127.0.0.1]:44079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcGzh-00077I-7K for submit@debbugs.gnu.org; Mon, 19 Feb 2024 22:40:33 -0500 Original-Received: from forward502c.mail.yandex.net ([178.154.239.210]:40424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcGzc-000772-2r for 69220@debbugs.gnu.org; Mon, 19 Feb 2024 22:40:32 -0500 Original-Received: from mail-nwsmtp-smtp-production-main-37.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-37.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:291a:0:640:791e:0]) by forward502c.mail.yandex.net (Yandex) with ESMTPS id 5F7E060BB6; Tue, 20 Feb 2024 06:40:03 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-37.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 1eHXFukvI0U0-ixffBnR0; Tue, 20 Feb 2024 06:40:02 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1708400402; bh=W76C7/+Fi9ck98cIPLVlcepnZaljquq/ebGNObK6h7k=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=qOJjKW/ZtNW7vuNOtf9Q6f5ZV4CCBwMKlEilFcZC/sSz4izixEFxZzhRYEP7DqVj5 cG6ENYUSPFEFtXEVEPgKb+0vEaObfsxHB+m19hx4DXfM+y3BD6uf4GGgtT+K0q+nxB k5XrcXy0yDxVl3WGaec/fezrnaI+GxS8iCtPN3p0= Authentication-Results: mail-nwsmtp-smtp-production-main-37.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:280308 Archived-At: 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. > >=20 > > No, that's not what I'm suggesting.=C2=A0 If you re-read the above I sa= y > > "applied to every conflict in the buffer" (rather than some > > specific > > N), > > and I don't say "resolve" or anything like "resolution". > >=20 > > 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). >=20 > Sorry, I'm not following =F0=9F=98=85 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?