From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#69242: project-any-command with overriding-local-map Date: Mon, 19 Feb 2024 18:01:56 +0200 Message-ID: References: <86frxrj83q.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24295"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Juri Linkov , 69242@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 19 17:02: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 1rc66a-000667-M6 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Feb 2024 17:02:57 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rc66L-0005PB-VA; Mon, 19 Feb 2024 11:02:41 -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 1rc66K-0005P2-T2 for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 11:02:40 -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 1rc66K-00041u-KZ for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 11:02:40 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rc66f-0001mW-Ju for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 11:03:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Feb 2024 16:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69242 X-GNU-PR-Package: emacs Original-Received: via spool by 69242-submit@debbugs.gnu.org id=B69242.17083585486719 (code B ref 69242); Mon, 19 Feb 2024 16:03:01 +0000 Original-Received: (at 69242) by debbugs.gnu.org; 19 Feb 2024 16:02:28 +0000 Original-Received: from localhost ([127.0.0.1]:43256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rc667-0001kI-EU for submit@debbugs.gnu.org; Mon, 19 Feb 2024 11:02:27 -0500 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:59571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rc664-0001jy-Sh for 69242@debbugs.gnu.org; Mon, 19 Feb 2024 11:02:25 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 516415C00A0; Mon, 19 Feb 2024 11:01:58 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 19 Feb 2024 11:01:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1708358518; x=1708444918; bh=HT4jTkP+UaoSTB/nbKF7NFdvAr7dGZfUSy8J5VnUamY=; b= HXkmcpAIAZTJ1+UyhPP9DApzvAv7O21fodvN+uX8o6HzqzcaHkdd1TRJrpcgnAQ7 YrXzSjBG+9YttZxM9QAMlFLcQI1oaJ9gJ5xEOKF4tZU/eL8jbyBQemBKXNsAcuR/ BBnv4mdTe7nU9c2AW/ugURCWCVTIfglSNuzDcWILfaXYoxQpatlmpyEG9fH4PxJP xsFOWuNypfhNtVw0utC9DPAKJQLPLHVFMm0A7KzCcyyLb1ePnb9PZ7BEMoUhBgpd AsLdKoRfLp+1+9LgiYNADPH4VVVzyRRwHd3w5IHscIJ+ZDK0+MMvh9iq8+XXRxr4 inCHx6IOEs9MPYbXdTm5Tw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1708358518; x= 1708444918; bh=HT4jTkP+UaoSTB/nbKF7NFdvAr7dGZfUSy8J5VnUamY=; b=Q kx09aEyRgMqw5mxk7ymzar1VWRomc55gm+jzZlHvip23JxIwmg7AGzDcxB422mVj UTMQxYsm+CE3mQTDnOR1LZwk2L4vB2xniw0fFZE1IBJCUxF7gg0k/G0T0RzopDDD wLIkVpjccIp8Xy42sSFYONAPMgYWf1vmk0pciFwlqveJnLWt7zikyfCjvPUV8k2H zhm/Os1gL0YZB4R8t+Ah5ky3E3RxhYp/w3YExZZwoVdyv/wYMvHO4irTrr1RhAZo Lydrc4XUdXMIPf5SUu0tMorUb5Gs6RCa6I2Mt6Flkm5LEmdgKhm3/s1FP/P5Y5Xz GQjiLlWY/CR+opomchxQQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdekgdekudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhithhr hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg hrnheptdfhuedvtdevleegueelvedvjeevheffveevhedvuefftdefhfdvueeggfetgfdt necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih htrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 19 Feb 2024 11:01:57 -0500 (EST) Content-Language: en-US In-Reply-To: <86frxrj83q.fsf@mail.linkov.net> 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:280277 Archived-At: On 17/02/2024 19:17, Juri Linkov wrote: > And indeed evaluating in a*vc-diff* buffer: > > M-: (let ((overriding-local-map project-prefix-map)) (key-binding (read-key-sequence "? ") t)) > > returns nil for any longer than 1-key binding such as 'C-c C-a' or 'C-c RET a'. I suppose that's because you are entering a sequence that belongs to a local map (diff-mode-map), and overriding-local-map overrides them entirely ("INSTEAD OF" in the docstring), rather than having a higher priority, which is overriding-terminal-local-map does. > Then found this patch fixes the problem completely (no idea why): > > diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el > index aa92a73336e..fe866312931 100644 > --- a/lisp/progmodes/project.el > +++ b/lisp/progmodes/project.el > @@ -1871,7 +1874,7 @@ project-any-command > (interactive) > (let* ((pr (project-current t)) > (prompt-format (or prompt-format "[execute in %s]:")) > - (command (let ((overriding-local-map overriding-map)) > + (command (let ((overriding-terminal-local-map overriding-map)) > (key-binding (read-key-sequence > (format prompt-format (project-root pr))) > t))) LGTM, thanks. Let's see if this one triggers any other edge cases we didn't test for.