From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#74509: Feature request - smerge-mode Date: Sat, 21 Dec 2024 10:47:23 +0200 Message-ID: <86plll8lt0.fsf@gnu.org> References: <86bjxx817w.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5298"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74509@debbugs.gnu.org To: monnier@iro.umontreal.ca, Branislav =?UTF-8?Q?Zahradn=C3=ADk?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 21 09:48:19 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 1tOv9m-0001Cs-TM for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 21 Dec 2024 09:48:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOv9Y-00028T-1F; Sat, 21 Dec 2024 03:48:04 -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 1tOv9W-00028G-FT for bug-gnu-emacs@gnu.org; Sat, 21 Dec 2024 03:48:02 -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 1tOv9W-0004wt-7e for bug-gnu-emacs@gnu.org; Sat, 21 Dec 2024 03:48:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=GEsCYNaj7t0SY17AysYUb1EOOyVTmKMRne6nffiwtCk=; b=QUD55K3v0HVi1Sz84kLrwLJrrt7fwYSeop6GxS4ro5CGPP4cedrT8sBDbGHRqvm4snULSq+XTYQHbZ4UAZSm5LnVNBaGiDQonY5LQ0H7v+7HVeuE14kdU/CyggZmR9CyFOjxx/hBs0cNrUl22+9Hc3mGpdR4HclammqF7dOKMlY+7uUsQ8x1iNX8n2oGkWB32ZP69R3rSy9w66WMoHNPq5medKlhl8SgPYyMoh5SRUT2ITCay1HyWbKkIJcFAhz2xm3McZT5QQC9GeDxzj/fLVYE6HfGKaOjyw54vYjBpTMZm/52Qu68gRxUx0xhGVLy0M3ar+9PGlQz+IcgPGKTqg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tOv9V-0005IW-Pt for bug-gnu-emacs@gnu.org; Sat, 21 Dec 2024 03:48:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Dec 2024 08:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74509 X-GNU-PR-Package: emacs Original-Received: via spool by 74509-submit@debbugs.gnu.org id=B74509.173477085620326 (code B ref 74509); Sat, 21 Dec 2024 08:48:01 +0000 Original-Received: (at 74509) by debbugs.gnu.org; 21 Dec 2024 08:47:36 +0000 Original-Received: from localhost ([127.0.0.1]:45183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOv95-0005Hh-OW for submit@debbugs.gnu.org; Sat, 21 Dec 2024 03:47:36 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOv93-0005HN-RU for 74509@debbugs.gnu.org; Sat, 21 Dec 2024 03:47:34 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOv8x-0004sf-BF; Sat, 21 Dec 2024 03:47:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=GEsCYNaj7t0SY17AysYUb1EOOyVTmKMRne6nffiwtCk=; b=LClYcNPjq38UBHYzdS6x RPWPK8qMsmO4MN8WEMrw6whx7kD5KWJxHuHvD+JAxQMxvA/siS8Wy+s1JhUWQM+NTvu7nO19s2pV0 ZttFYFn9l6naqQvUUiCCg+cT+2p0qOkBXmeAdTD9kI1Z8poksnLtUWMgpruu2eyKOajzUo/WwJt46 0yIqv6PsDF7Ht6GzeN5uDOnwJOr4PvJozm37T3WF+ZaBJV9kQTsxIp1x58T5kM6I/M/P/Xtd2zyvI d75V52Ik43xB2hvxFkrxrJaOKQRzKIAznBgZlXnl9cZssrvUoqal8NUE8C/YgX9PSgG+RCQNiCH+v HfFEG6/Bq9HLpQ==; In-Reply-To: (message from Branislav =?UTF-8?Q?Zahradn=C3=ADk?= on Tue, 3 Dec 2024 07:39:30 +0100) 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:297498 Archived-At: > From: Branislav Zahradník > Date: Tue, 3 Dec 2024 07:39:30 +0100 > Cc: Eli Zaretskii , 74509@debbugs.gnu.org > > On Tue, 3 Dec 2024 at 04:26, Stefan Monnier wrote: > > >> >> # keybinding > >> >> would be nice to provide default keybinding for smerge-swap: C-c ^ s > >> Interesting. I've never found a use for that command, personally. > >> Could you give some hint for the situations where you found it handy? > > Example: > > I keep my functions alphabetically ordered. > > When I merge two changes which added function in same alphabetical place, > > I often need to change their order. > > I see; makes sense! > > >> >> # smerge-extend > >> >> Helpful when user intent to keep both. > >> Sorry: to keep both what? > > > > Both = lower + upper. > > > > Using above example: > > when I intent to keep both functions, end of block (eg: C, Java, Perl, ...) > > will currently not appear twice, > > Really? Here, when I merge two changes which both add a function at the > same place I get a conflict with the complete functions (with their > respective closing brace and trailing space if applicable). > > >> Hmm... Why just one line and why only from the end? > > One line - one can use it multiple times to add more. > > And yes, you are right, it should accept numeric argument (negative for > > preceding line). > > Though I still believe common use case will be to extend with following. > > I guess a numeric argument could be handy (e.g. to handle the case of > extending from the front rather than from the end). > I had in mind a different UI where you move point to the "end" of the > extension (i.e. to right after the one-or-two lines you want to add to > the ends), but I guess that would be more clunky than what you have. > > >> [ Unless you specifically chose 2-way conflicts, I recommend you > >> investigate how to get 3-way conflicts, because they give a lot more > >> information and allow for example `smerge-resolve` to "just work" in > >> more cases. YMMV, but personally whenever I'm faced with a 2-way > >> conflict, I'm frustrated. ] > > Different experiences - I for example run mostly into 2-way conflicts > > Maybe it's because of > > % grep -B1 diff3 ~/.gitconfig > [merge] > conflictstyle = diff3 > % > > 🙂 > > As I said, everyone has different preferences and experiences. > I'm trying to organize my code (diff-friendly programming) that way > so only minimum number of lines / informations is changed so conflicts > are usually easier to solve, including punctuation characters used by > given programming language. That leads to small diffs, easy to solve, > but with necessity of having this extend functionality. How should we go about this bug report? Can we make some progress here? Or should we close it as wontfix?