GNU bug report logs - #47620
[PATCH] Allow complex key bindings in project-switch-project

Previous Next

Package: emacs;

Reported by: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>

Date: Tue, 6 Apr 2021 14:58:01 UTC

Severity: normal

Tags: patch

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
To: 47620 <at> debbugs.gnu.org
Subject: bug#47620: [PATCH] Allow complex key bindings in project-switch-project
Date: Tue, 06 Apr 2021 16:57:31 +0200
[Message part 1 (text/plain, inline)]
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

[0001-Allow-complex-key-bindings-in-project-switch-project.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
-- 
$ keyserver=hkps://hkps.pool.sks-keyservers.net
$ keyid=744A4F0B4F1C9371
$ gpg --keyserver $keyserver --search-keys $keyid

This bug report was last modified 4 years and 43 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.