all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: "Philip K." <philip@warpmail.net>
Cc: 41890@debbugs.gnu.org, Dmitry Gutov <dgutov@yandex.ru>, juri@linkov.net
Subject: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el
Date: Thu, 18 Jun 2020 18:22:33 +0100	[thread overview]
Message-ID: <874kr8jnl2.fsf@tcd.ie> (raw)
In-Reply-To: <87ftasea9s.fsf@warpmail.net> (Philip K.'s message of "Thu, 18 Jun 2020 16:09:03 +0200")

Just some minor nits from me.

> From: Philip K <philip@warpmail.net>
> Date: Thu, 18 Jun 2020 16:06:19 +0200
> Subject: [PATCH] Use same keys in project-switch-project as in
>  project-prefix-map
>
> * project.el (project-switch-commands): Convert to user option and
> change structure.
> (project-switch-use-entire-map): Add new option.
> (project--keymap-prompt): Adapt to change in project-switch-commands

Nit: Missing full stop.

> (project-switch-project): Use project-prefix-map instead of
> project-switch-commands to query valid commands.
> ---
>  lisp/progmodes/project.el | 63 +++++++++++++++++++++++++--------------
>  1 file changed, 41 insertions(+), 22 deletions(-)
>
> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
> index e24d81c1b4..33946f78a8 100644
> --- a/lisp/progmodes/project.el
> +++ b/lisp/progmodes/project.el
> @@ -900,27 +900,46 @@ project-prompt-project-dir
>  ;;; Project switching
>  
>  ;;;###autoload
> -(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"))
> +  "Alist mapping commands to descriptions.
>  Used by `project-switch-project' to construct a dispatch menu of
>  commands available upon \"switching\" to another project.
>  
> -Each element looks like (KEY LABEL COMMAND), where COMMAND is the
> -command to run when KEY is pressed.  LABEL is used to distinguish
> -the choice in the dispatch menu.")
> +Each element looks like (COMMAND LABEL), where COMMAND should be
                           ^^^^^^^^^^^^^^^
                           (COMMAND . LABEL)

> +bound in `project-prefix-map'.  LABEL is used to distinguish the
> +choice in the dispatch menu."
> +  :type '(alist :key-type function
> +                :value-type string)
> +  :options (mapcan (lambda (ent)
> +                     (and (commandp (cdr ent))
> +                          (list (cdr ent))))
> +                   (cdr project-prefix-map))
> +  :version "28.1")
> +
> +(defcustom project-switch-use-entire-map t
> +  "Make `project-switch-project' use entire `project-prefix-map'.
> +If nil, `project-switch-project' will only recognize commands
> +listed in `project-switch-commands', and signal an error when
> +others are invoked.  Otherwise, all keys in
> +`project-switch-commands', are legal even if they aren't listed
                           ^^^
                           Nit: Unnecessary comma.

> +in the minibuffer."
> +  :type 'bool
> +  :version "28.1")

Thanks,

-- 
Basil





  reply	other threads:[~2020-06-18 17:22 UTC|newest]

Thread overview: 110+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-16  9:49 bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Theodor Thornhill
     [not found] ` <83pn9z13xq.fsf@gnu.org>
2020-06-16 16:44   ` Theodor Thornhill
2020-06-16 17:16     ` Eli Zaretskii
2020-06-16 17:30       ` Theodor Thornhill
2020-06-16 18:14         ` Basil L. Contovounesios
2020-06-16 19:07           ` Theodor Thornhill
2020-06-16 19:12             ` Theodor Thornhill
2020-06-16 21:57               ` Juri Linkov
2020-06-16 22:47                 ` Dmitry Gutov
2020-06-16 23:24                   ` Juri Linkov
2020-06-16 23:42                     ` Dmitry Gutov
2020-06-17 21:23                       ` Juri Linkov
2020-06-17 22:16                         ` Dmitry Gutov
2020-06-17 22:27                           ` Juri Linkov
2020-06-17 22:38                             ` Dmitry Gutov
2020-06-17 23:23                               ` Juri Linkov
2020-06-17 23:36                                 ` Dmitry Gutov
2020-06-18 22:59                                   ` Juri Linkov
2020-06-18 23:08                                     ` Dmitry Gutov
2020-06-20 23:41                                   ` Juri Linkov
2020-06-21  0:25                                     ` Dmitry Gutov
2020-06-17 10:51                 ` Philip K.
2020-06-16 20:31             ` Basil L. Contovounesios
2020-06-17 19:10               ` Theodor Thornhill
2020-06-17 19:40                 ` Basil L. Contovounesios
2020-06-17 23:07                 ` Dmitry Gutov
2020-06-16 21:23       ` Dmitry Gutov
2020-06-16 21:35         ` Dmitry Gutov
2020-06-17 14:28           ` Eli Zaretskii
2020-06-17 14:27         ` Eli Zaretskii
2020-06-17 15:49           ` Dmitry Gutov
2020-06-17 16:33             ` Eli Zaretskii
2020-06-17 22:23               ` Dmitry Gutov
2020-06-18 13:38                 ` Eli Zaretskii
2020-06-18 15:47                   ` Dmitry Gutov
2020-06-18 17:24                     ` Eli Zaretskii
2020-06-18 18:18                       ` Michael Albinus
2020-06-18 16:25       ` Stefan Monnier
2020-06-18 17:30         ` Eli Zaretskii
2020-06-18 18:22           ` Dmitry Gutov
2020-06-18 18:42             ` Eli Zaretskii
2020-06-18 18:54               ` Dmitry Gutov
2020-06-18 19:04                 ` Eli Zaretskii
2020-06-18 21:12                   ` Dmitry Gutov
2020-06-19  6:11                     ` Eli Zaretskii
     [not found] ` <3ad1ecbb-36d6-79c0-7a7b-6ff3a561e512@yandex.ru>
2020-06-18 14:09   ` Philip K.
2020-06-18 17:22     ` Basil L. Contovounesios [this message]
2020-06-18 18:50       ` Philip K.
2020-06-18 22:10         ` Juri Linkov
2020-06-18 23:01           ` Dmitry Gutov
2020-06-18 23:24             ` Juri Linkov
2020-06-18 23:31               ` Dmitry Gutov
2020-06-19 10:15                 ` Simen Heggestøyl
2020-07-11 17:07         ` Sean Whitton
2020-07-12 15:18           ` Dmitry Gutov
2020-07-12 16:24             ` Sean Whitton
2020-07-12 20:12               ` Dmitry Gutov
2020-07-18 16:06                 ` bug#42210: " Sean Whitton
2020-07-19 23:46                   ` Dmitry Gutov
2020-07-20  0:30                     ` Juri Linkov
2020-07-20  1:04                       ` bug#41890: " Dmitry Gutov
2020-07-20 20:47                         ` Juri Linkov
2020-07-20 21:00                           ` Dmitry Gutov
2020-07-20 16:49                     ` Sean Whitton
2020-07-20 20:41                       ` bug#41890: " Juri Linkov
2020-07-20 21:02                         ` Dmitry Gutov
2020-07-20 21:24                         ` bug#41890: " Sean Whitton
2020-07-20 22:00                       ` Dmitry Gutov
2020-07-21  0:33                         ` Sean Whitton
2020-07-21 23:38                           ` Juri Linkov
2020-07-22  0:38                             ` Dmitry Gutov
2020-07-22  1:33                               ` Sean Whitton
2020-07-22 19:28                                 ` bug#41890: " Sean Whitton
2020-07-23 23:46                                   ` Dmitry Gutov
2020-07-24  2:04                                     ` Sean Whitton
2020-07-24  6:01                                       ` bug#41890: " Eli Zaretskii
2020-07-24 15:12                                         ` Sean Whitton
2020-07-24 16:12                                           ` Eli Zaretskii
2020-07-24 21:20                                             ` Sean Whitton
2020-07-24 22:54                                               ` Dmitry Gutov
2020-07-24 23:13                                                 ` Sean Whitton
2020-07-24 23:45                                                   ` Dmitry Gutov
2020-07-25  6:14                                               ` Eli Zaretskii
2020-07-26  5:15                                                 ` bug#41890: " Sean Whitton
2020-07-27  0:01                                                   ` Dmitry Gutov
2020-07-22  1:31                             ` Sean Whitton
2020-07-23  0:32                               ` bug#41890: " Juri Linkov
2020-07-23 15:06                                 ` Sean Whitton
2020-07-20 10:21                   ` Basil L. Contovounesios
2020-07-20 14:45                     ` Eli Zaretskii
2020-07-12 23:48               ` Juri Linkov
2020-07-13  0:13                 ` Dmitry Gutov
2020-07-13  0:23                   ` Juri Linkov
2020-07-13  6:56                     ` Philip K.
2020-07-13 10:47                       ` Dmitry Gutov
2020-07-13 10:50                         ` Dmitry Gutov
2020-07-13 11:02                           ` Philip K.
2020-07-18 15:19                             ` Sean Whitton
2020-07-13 23:49                       ` Juri Linkov
2020-07-14  7:03                         ` Philip K.
2020-07-14 22:34                           ` Juri Linkov
2020-07-14 23:32                             ` Dmitry Gutov
2020-07-15 23:59                               ` Juri Linkov
2020-07-16 13:38                                 ` Dmitry Gutov
2020-07-15 19:21                             ` Philip K.
2020-07-15 23:35                               ` Dmitry Gutov
     [not found]     ` <902001d0-ab1c-b697-bfd0-b8ec195dc65f@yandex.ru>
2020-06-19 10:13       ` Simen Heggestøyl
2020-06-19 10:26         ` Philip K.
2020-06-19 10:50           ` Simen Heggestøyl
2020-06-19 12:25             ` Dmitry Gutov

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

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

  git send-email \
    --in-reply-to=874kr8jnl2.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=41890@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=juri@linkov.net \
    --cc=philip@warpmail.net \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.