unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: 69242@debbugs.gnu.org
Subject: bug#69242: project-any-command with overriding-local-map
Date: Sun, 25 Feb 2024 09:33:17 +0200	[thread overview]
Message-ID: <868r39yp4y.fsf@mail.linkov.net> (raw)
In-Reply-To: <16ad0b73-693e-4331-98ad-f5ac9c67d004@gutov.dev> (Dmitry Gutov's message of "Thu, 22 Feb 2024 05:42:15 +0200")

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.





      reply	other threads:[~2024-02-25  7:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-17 17:17 bug#69242: project-any-command with overriding-local-map Juri Linkov
2024-02-19 16:01 ` Dmitry Gutov
2024-02-20  7:49   ` Juri Linkov
2024-02-22  3:42     ` Dmitry Gutov
2024-02-25  7:33       ` Juri Linkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=868r39yp4y.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=69242@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).