From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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 21:24:53 -0500 Message-ID: References: <865xykr79f.fsf@gnu.org> Reply-To: Stefan Monnier 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="14998"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 69220@debbugs.gnu.org To: Konstantin Kharlamov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 20 03:26:00 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 1rcFpY-0003eZ-Fi for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Feb 2024 03:26:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcFpL-0002Pr-E7; Mon, 19 Feb 2024 21:25:47 -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 1rcFpF-0002P9-B0 for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 21:25:42 -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 1rcFpE-0003oh-Ui for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 21:25:41 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rcFpa-00052P-Bi for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 21:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2024 02:26: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.170839592619317 (code B ref 69220); Tue, 20 Feb 2024 02:26:02 +0000 Original-Received: (at 69220) by debbugs.gnu.org; 20 Feb 2024 02:25:26 +0000 Original-Received: from localhost ([127.0.0.1]:43949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcFp0-00051V-5k for submit@debbugs.gnu.org; Mon, 19 Feb 2024 21:25:26 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:52906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcFox-00051C-5c for 69220@debbugs.gnu.org; Mon, 19 Feb 2024 21:25:24 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E53048090D; Mon, 19 Feb 2024 21:24:55 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1708395895; bh=hE/dcT4t+k8qXFiigZmig4T8KX1x6IiilALz9JsMQVo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ccCuKZHQgAYEle6C9Bmqe/SLBwEMpP9f/feeS4pSgfByK504mUA8L7oSoirm/Qh9I Psy+mQp4/Pedh76Px+7fkF4004hBfe9RfnrCuxts/kU/pEPmh6/Ln8G8GUSrV1RPXh Df/RaHh4qnaJ4FnhgEV44mn4HQJj2kDDB34QaJskPo6no3wK5f+t8z3taMI7kISGxV h6EPB/Sp1N/KcQapJrhwQxR/0CAIDjp4k2mccDkMcWfyqupjSisp5gUcQ7e1SZhowY IlDj3EyzS8UNoXYWqQ5mqyJFP0n4bfqOH5C3P4AqEozBqbDhfV3RVYJY0pn7mCMTrQ Eg0KrlbBaCHqQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id EA6B6807A5; Mon, 19 Feb 2024 21:24:54 -0500 (EST) Original-Received: from pastel (unknown [45.72.205.238]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C2CE112021C; Mon, 19 Feb 2024 21:24:54 -0500 (EST) In-Reply-To: (Konstantin Kharlamov's message of "Mon, 19 Feb 2024 20:25:53 +0300") 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:280300 Archived-At: >> 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 functio= n `smerge-apply- > all-conflicts` that would accept a prefix command 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. > If so, that would be almost the same as what I did, I think so, yes. >> 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. `C-x (` starts a keyboard macro `C-x ^ n` is `smerge-next` `C-x ^ u` is `smerge-keep-upper` `C-x e` terminates the keyboard macro and repeats it immediately. Every `e` after that repeats the keyboard macro. > 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` ... I like `M-x` too :-) Stefan