emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47620: closed ([PATCH] Allow complex key bindings in project-switch-


From: GNU bug Tracking System
Subject: bug#47620: closed ([PATCH] Allow complex key bindings in project-switch-project)
Date: Wed, 07 Apr 2021 00:29:02 +0000

Your message dated Wed, 7 Apr 2021 03:28:27 +0300
with message-id <34e7eb22-597a-985c-5172-130f8bebde86@yandex.ru>
and subject line Re: bug#47620: [PATCH] Allow complex key bindings in 
project-switch-project
has caused the debbugs.gnu.org bug report #47620,
regarding [PATCH] Allow complex key bindings in project-switch-project
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
47620: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=47620
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] Allow complex key bindings in project-switch-project Date: Tue, 06 Apr 2021 16:57:31 +0200
Hi,

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.

Best regards,
Dario

Attachment: 0001-Allow-complex-key-bindings-in-project-switch-project.patch
Description: Allow complex key bindings in project-switch-project

-- 
$ keyserver=hkps://hkps.pool.sks-keyservers.net
$ keyid=744A4F0B4F1C9371
$ gpg --keyserver $keyserver --search-keys $keyid

--- End Message ---
--- Begin Message --- Subject: Re: bug#47620: [PATCH] Allow complex key bindings in project-switch-project Date: Wed, 7 Apr 2021 03:28:27 +0300 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1
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.)


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]