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#74509: Feature request - smerge-mode Date: Mon, 02 Dec 2024 22:26:45 -0500 Message-ID: References: <86bjxx817w.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="9190"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74509@debbugs.gnu.org, Eli Zaretskii To: Branislav =?UTF-8?Q?Zahradn=C3=ADk?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 03 04:27:30 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 1tIJZS-0002G5-2K for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 Dec 2024 04:27:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIJZ3-0004Bb-3c; Mon, 02 Dec 2024 22:27:05 -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 1tIJZ1-0004BB-4H for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 22:27:03 -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 1tIJZ0-0003UX-Rr for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 22:27: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:Date:References:In-Reply-To:From:To:Subject; bh=wJTJLlbVV1sJQ9ErR/9aRcAL7bI8j8jGpEFRJKFH5PU=; b=AZOwG06gdh3CaAKLOIVj8ap9KKm/HjjHItUtzAtqpuHWt5vJbM0Rj3QUDqHU3WcGHO18qtE/7Gbld8do2YvisJI1qvmey5Ne8n+J+KLbhMUvTPQwAjqSfERVVtL4BYHUCj0FTIVdaqM40FsbtFdbFknTfHOXbeVwzqCc94c3vDyxHR49X/UAZuliyVR1cS1iaqWEPEgVdoBLy2EiYUWp0Tb68Vy59Ozz5lzzfjEfTblyoVZH099jGzBPPECTSGRFgTruXZih9vSNgvCpPHYiMYU0BHOUCd4+KU0BZIXmQdM+w2G1aSYy/aLQznd/yL0G5j+CKjl28Na5oboH5PpZCQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tIJZ0-0001tw-MR for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 22:27: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, 03 Dec 2024 03:27:02 +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.17331964157293 (code B ref 74509); Tue, 03 Dec 2024 03:27:02 +0000 Original-Received: (at 74509) by debbugs.gnu.org; 3 Dec 2024 03:26:55 +0000 Original-Received: from localhost ([127.0.0.1]:57580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIJYt-0001tY-5h for submit@debbugs.gnu.org; Mon, 02 Dec 2024 22:26:55 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIJYr-0001tK-GB for 74509@debbugs.gnu.org; Mon, 02 Dec 2024 22:26:53 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 210EF8093D; Mon, 2 Dec 2024 22:26:47 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1733196406; bh=QVqBQkWk+Q9B+Dk+50AyzAo6AVhy/ZLW57ahMEEHvp4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=BMRtxkXCuqpZ/RUd1FhKIouqSQQOYFaVF0A04QRzhJglUPYZ7YtF3a/ntWzPRW3qX bcSlSopd8k1Fn6ZCuZDPWOgeF0jHXMfYA69MTaxgGDTUjT5wvgm/XBGOp0lzry3t1r nRpX43xLAX44vEI+/vkF6tJhWBsOqNN1N45z277OqUXzmzLPzQLhzfwT2IjfP/YLxN 4sTak8dF7fRLfBRh8S8AwwRvYX5zNlA7l7x+x2V1HZtwNFoRKmJvNGtsOF25+PO2pL kVnHNKJDzTCbaJYNRTq1xzBUYKTeNSONLPP+B2UF5NhOk+rTiz/sW0RkeuvO+4ZJGm uMK8vd17REDXQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 39916801C2; Mon, 2 Dec 2024 22:26:46 -0500 (EST) Original-Received: from alfajor (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0AEE1120487; Mon, 2 Dec 2024 22:26:46 -0500 (EST) In-Reply-To: ("Branislav =?UTF-8?Q?Zahradn=C3=ADk?="'s message of "Mon, 2 Dec 2024 08:59:32 +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:296351 Archived-At: >> >> # 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 =3D 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 =3D diff3 % =F0=9F=99=82 Stefan