[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#41890: 28.0.50; [PATCH]: Add bindings for project.el
From: |
Simen Heggestøyl |
Subject: |
bug#41890: 28.0.50; [PATCH]: Add bindings for project.el |
Date: |
Fri, 19 Jun 2020 12:13:05 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) |
Dmitry Gutov <dgutov@yandex.ru> writes:
> On 18.06.2020 17:09, Philip K. wrote:
>
>> The patch below fixes that, but allows changing if you only want the
>> listed keys to be valid (the default) or every key in
>> project-prefix-map.
>> It turned out that the transiment map approach didn't work, as it
>> ignored the value in default-directory, thus running all commands in
>> whatever the current project was.
>
> Looks reasonable to me. But let's also hear from the original author.
>
> Simen, what do you think? The patch is at
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41890#127.
Looks good to me too!
My only gripe would be that it makes it a bit harder to add new
commands, since it now requires modifying both project-switch-commands
and project-prefix-map. Maybe we could reintroduce the helper function
we had for that purpose earlier.
-(defvar project-switch-commands
- '((?f "Find file" project-find-file)
- (?g "Find regexp" project-find-regexp)
- (?d "Dired" project-dired)
- (?v "VC-Dir" project-vc-dir)
- (?e "Eshell" project-eshell))
- "Alist mapping keys to project switching menu entries.
+(defcustom project-switch-commands
+ '((project-find-file . "Find file")
+ (project-find-regexp . "Find regexp")
+ (project-dired . "Dired")
+ (project-vc-dir . "VC-Dir")
+ (project-shell . "Shell")
+ (project-eshell . "Eshell"))
The project-shell command is added here, don't know if that was
intentional?
Also why not stick with the easier extensible list format? I could
imagine for instance adding long descriptions as an optimal third
element for the commands later on.
-- Simen
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, (continued)
Message not available
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Philip K., 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Basil L. Contovounesios, 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Philip K., 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Juri Linkov, 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Dmitry Gutov, 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Juri Linkov, 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Dmitry Gutov, 2020/06/18
- bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Simen Heggestøyl, 2020/06/19
Message not availablebug#41890: 28.0.50; [PATCH]: Add bindings for project.el,
Simen Heggestøyl <=
bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Philip K., 2020/06/19
bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Simen Heggestøyl, 2020/06/19
bug#41890: 28.0.50; [PATCH]: Add bindings for project.el, Dmitry Gutov, 2020/06/19