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#73544: smerge key bindings awkward Date: Thu, 17 Oct 2024 13:37:43 -0400 Message-ID: References: <02F453E6-82FE-45D8-9C99-E5D5AB348245@dancol.org> <86wmit2xa0.fsf@gnu.org> <86msjp2tya.fsf@gnu.org> <586D4862-3603-46AE-9A8F-163BD7FB2FAA@dancol.org> <86r08ktg7w.fsf@gnu.org> <931560E0-E032-4570-A4A4-378215660C25@dancol.org> <86bjzot1z6.fsf@gnu.org> <122D1E12-D860-41AC-A1CF-18ECCA20AD60@dancol.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12692"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73544@debbugs.gnu.org, dmitry@gutov.dev, Eli Zaretskii To: Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 17 19:38:57 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 1t1USe-000357-Uw for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Oct 2024 19:38:57 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1USR-0002Xi-9V; Thu, 17 Oct 2024 13:38:43 -0400 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 1t1USP-0002XP-EY for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2024 13:38:41 -0400 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 1t1USP-0001cq-5L for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2024 13:38:41 -0400 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=lBq3h0YE2BIFvRsQ7IHcaea59kW08ISgBkmxWRH3xhA=; b=quoUwCGDV+SjbloF7B8fGV67RvnXK3PFG9VML4OJjasXHjOl08qffWgT+wksamddN5EdM1Y9Ojnd13K3NUDO+TAlUDcI2hZRKCi8YQapdufJuqZ2j+2gPV4wmIQWnP085JkMvUThDkDxyyq7lEGHPd6umKwj+rqhXsydRPEgbqhWN+7n0xT+BQzV87MnoadPLEnOd4eA7k0ZH/qYRkyMirr/oYb+75m6ydW+5rK5CNW2OedHTrVUBwAqwdTt7v8U1GfxKZdcGpLFfp6w8bEEXSCvtQwKi+ANCd5EV9NEfeBG+z+WVkdGyVqecCHbe0f7xivvGOVgLtJyD9h+sk50jg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t1USj-0003Bt-UW for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2024 13:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Oct 2024 17:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73544 X-GNU-PR-Package: emacs Original-Received: via spool by 73544-submit@debbugs.gnu.org id=B73544.172918670112172 (code B ref 73544); Thu, 17 Oct 2024 17:39:01 +0000 Original-Received: (at 73544) by debbugs.gnu.org; 17 Oct 2024 17:38:21 +0000 Original-Received: from localhost ([127.0.0.1]:35493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1US1-0003A8-NE for submit@debbugs.gnu.org; Thu, 17 Oct 2024 13:38:21 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:3644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1URw-00039q-HD for 73544@debbugs.gnu.org; Thu, 17 Oct 2024 13:38:16 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0A20B100055; Thu, 17 Oct 2024 13:37:45 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1729186664; bh=OnteRyggPnKUk4wJIXpXCs2GgPUl0KgWlcP0WFWifRI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=mIINlgppxmJmWP59nTzCB4fZpwDKtY/uszKOUD+4LFvLYbR4Q9it26aSGoYtqQhE+ fSgW8Ki4Dd6QA1Mibi1xZoo2njRrdpCkY3h1ImrYnrbRPUqVDMxAhCguGBId9E7nkO V9mFOrGLYn3zxlmI8KnHMFR/FEnpbPxUlmDzl+45MNHcHtlWrM2sBF9mu0Pjjcg5nf QAUTK8gORg31CeUJRtMjfNciIJpnz0w7sR04o16HmgEWby4DqL+5pTJqswdQf4qssp 1zFvqdU6fRpFM1v6IO6Acmczy7VX78AVPwYNLFoRIM3/JHG/Gr5clkd4h75vSWV0Mi BsWlB29VyG+EQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 633B7100042; Thu, 17 Oct 2024 13:37:44 -0400 (EDT) Original-Received: from alfajor (unknown [23.233.149.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4231012034F; Thu, 17 Oct 2024 13:37:44 -0400 (EDT) In-Reply-To: <122D1E12-D860-41AC-A1CF-18ECCA20AD60@dancol.org> (Daniel Colascione's message of "Sun, 13 Oct 2024 12:57:01 -0400") 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:293739 Archived-At: > It's a defect in the user interface. IIUC the original scenario is: C-c ^ n C-c ^ n and here being annoyed that `n` was inserted (after flashing the buffer because `C-c ^` is not bound to anything) because that was the last conflict and `smerge-mode` turned itself off automatically. I'm not completely sure what is the exact defect you see here and how you suggest to fix it. E.g. do you also care to "fix" a case like emacs foo C-c ^ n where the user forgot to enable `smerge-mode`? How 'bout the patch below, which will end up preventing `read-key-sequence` from stopping at `C-c ^`? Stefan diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index aad3e302826..fa52286fee7 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el @@ -168,6 +168,10 @@ smerge-command-prefix (const :tag "none" "") string)) +;; Make it so `C-x ^ n' doesn't insert `n' but just signals an error +;; when SMerge mode is not enabled. +;;;###autoload (global-set-key "\C-c^" (make-sparse-keymap)) + (defvar-keymap smerge-mode-map (key-description smerge-command-prefix) smerge-basic-map)