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: Mon, 19 Feb 2024 20:25:53 +0300 Message-ID: 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="26183"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.50.3 Cc: 69220@debbugs.gnu.org To: Stefan Monnier , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 19 18:27:10 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 1rc7Q6-0006cj-CF for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Feb 2024 18:27:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rc7Pf-0002tU-PD; Mon, 19 Feb 2024 12:26:43 -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 1rc7Pd-0002tD-KG for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 12:26:41 -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 1rc7Pd-00034S-2u for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 12:26:41 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rc7Py-0004NF-8P for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 12:27: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: Mon, 19 Feb 2024 17:27: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.170836358016753 (code B ref 69220); Mon, 19 Feb 2024 17:27:02 +0000 Original-Received: (at 69220) by debbugs.gnu.org; 19 Feb 2024 17:26:20 +0000 Original-Received: from localhost ([127.0.0.1]:43330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rc7PI-0004M8-5l for submit@debbugs.gnu.org; Mon, 19 Feb 2024 12:26:20 -0500 Original-Received: from forward502c.mail.yandex.net ([178.154.239.210]:46442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rc7PF-0004Lz-No for 69220@debbugs.gnu.org; Mon, 19 Feb 2024 12:26:19 -0500 Original-Received: from mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:319b:0:640:ce08:0]) by forward502c.mail.yandex.net (Yandex) with ESMTPS id EF1EA60B59; Mon, 19 Feb 2024 20:25:53 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id rPUI0pDSgSw0-XH4En21k; Mon, 19 Feb 2024 20:25:53 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1708363553; bh=mlavuqdtyWyRw1y7rqV+kcf6DqM3pJfJ/z84r8oGwwM=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=FI5ofxFcqgFISqdI8MO9DunGW59O0GkPnXYzNyUKNG/KacDpGDvBoeC2x+G8e/sxm L3lqyZWKyIGdxU1/Pmn5amLFXflmj5A31caSHd/hvqVNN+P7jz+Mn2OKO1ywDZFKFA 4L5tnLEaoJ8QjhsTWrirLR0pw6NjJ+WZOm+OLJUY= Authentication-Results: mail-nwsmtp-smtp-production-main-59.iva.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:280283 Archived-At: 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. >=20 > Yeah, I'm not sure we need this. >=20 > 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=E2=80=A6 =F0=9F=98=85 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 >=20 > =C2=A0=C2=A0=C2=A0 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.