From: Dmitry Gutov <dgutov@yandex.ru>
To: Dario Gjorgjevski <dario.gjorgjevski@gmail.com>,
47620-done@debbugs.gnu.org
Subject: bug#47620: [PATCH] Allow complex key bindings in project-switch-project
Date: Wed, 7 Apr 2021 03:28:27 +0300 [thread overview]
Message-ID: <34e7eb22-597a-985c-5172-130f8bebde86@yandex.ru> (raw)
In-Reply-To: <fv2zojpmz7lauc.fsf@gmail.com>
Hi Dario,
On 06.04.2021 17:57, Dario Gjorgjevski wrote:
> project-switch-project currently only allows for single-char bindings to
> be used for its commands. Starting with emacs -Q, evaluate
>
> (require 'project)
> (define-key project-prefix-map (kbd "M-s g") 'rgrep)
> (add-to-list 'project-switch-commands '(rgrep "grep"))
>
> and then run project-switch-project (by default bound to C-x p p) and
> choose a project (hopefully you already have one available). You will
> see "[M-s g] grep" shown in the prompt, but you will not be able to
> choose it by typing M-s g.
>
> The patch attached bellow allows for any kind of key binding to be used.
> Admittedly, there may be a better way to do it since I did not spend
> much time looking into it.
>
> Please, share your thoughts.
Thanks for the patch, it's a nice addition.
Note that it broke the ability to 'C-g' out of the second prompt, see
the follow-up commit 1ff7cde102.
Likewise, any proposals with a better way to do this are welcome.
(Meantime, closing.)
prev parent reply other threads:[~2021-04-07 0:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-06 14:57 bug#47620: [PATCH] Allow complex key bindings in project-switch-project Dario Gjorgjevski
2021-04-07 0:28 ` Dmitry Gutov [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=34e7eb22-597a-985c-5172-130f8bebde86@yandex.ru \
--to=dgutov@yandex.ru \
--cc=47620-done@debbugs.gnu.org \
--cc=dario.gjorgjevski@gmail.com \
/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).