From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#69242: project-any-command with overriding-local-map Date: Sun, 25 Feb 2024 09:33:17 +0200 Organization: LINKOV.NET Message-ID: <868r39yp4y.fsf@mail.linkov.net> References: <86frxrj83q.fsf@mail.linkov.net> <86msrvfuci.fsf@mail.linkov.net> <16ad0b73-693e-4331-98ad-f5ac9c67d004@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8476"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 69242@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 25 08:36:05 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 1re93N-00023Z-6R for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Feb 2024 08:36:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1re92w-00017g-Rl; Sun, 25 Feb 2024 02:35:38 -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 1re92v-00015h-GG for bug-gnu-emacs@gnu.org; Sun, 25 Feb 2024 02:35:37 -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 1re92v-0002gb-7P for bug-gnu-emacs@gnu.org; Sun, 25 Feb 2024 02:35:37 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1re93J-0006J3-Ns for bug-gnu-emacs@gnu.org; Sun, 25 Feb 2024 02:36:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Feb 2024 07:36: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.170884652724125 (code B ref 69242); Sun, 25 Feb 2024 07:36:01 +0000 Original-Received: (at 69242) by debbugs.gnu.org; 25 Feb 2024 07:35:27 +0000 Original-Received: from localhost ([127.0.0.1]:50077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1re92k-0006Gv-8T for submit@debbugs.gnu.org; Sun, 25 Feb 2024 02:35:26 -0500 Original-Received: from mslow1.mail.gandi.net ([217.70.178.240]:45419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1re92h-0006GS-Hw; Sun, 25 Feb 2024 02:35:24 -0500 Original-Received: from relay6-d.mail.gandi.net (unknown [IPv6:2001:4b98:dc4:8::226]) by mslow1.mail.gandi.net (Postfix) with ESMTP id DDE3CC03FA; Sun, 25 Feb 2024 07:34:53 +0000 (UTC) Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 54F43C0006; Sun, 25 Feb 2024 07:34:29 +0000 (UTC) In-Reply-To: <16ad0b73-693e-4331-98ad-f5ac9c67d004@gutov.dev> (Dmitry Gutov's message of "Thu, 22 Feb 2024 05:42:15 +0200") X-GND-Sasl: juri@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:280598 Archived-At: close 69242 30.0.50 thanks > LGTM, thanks. Let's see if this one triggers any other edge cases we didn't > test for. Ok, now pushed to master. >> Also not sure how 'overriding-terminal-local-map' will affect >> 'universal-argument' that relies on 'overriding-terminal-local-map'. >> Maybe project.el should use >> (internal-push-keymap map 'overriding-terminal-local-map) >> like in 'set-transient-map'. Ok, need to try and test this more. > > Please do. Regarding 'universal-argument', I discovered that currently e.g. 'C-x p p RET C-u C-c C-a' keeps the argument, but loses default-directory (i.e. sets default-directory back to the old directory). So tried a patch below, and it keeps default-directory, but loses the argument. @@ -1883,7 +1886,11 @@ project-any-command (let ((project-current-directory-override root)) (call-interactively command)) (let ((default-directory root)) - (call-interactively command)))))) + (call-interactively command))) + (when (memq command + '( universal-argument universal-argument-more + digit-argument negative-argument)) + (project-any-command overriding-map prompt-format))))) Then tried 'C-u C-x p p RET C-c C-a' and it keeps default-directory and also keeps the C-u argument for 'C-c C-a' after switching the project. This means no more changes needed because the above key sequence works nicely. So now closing.