GNU bug report logs - #63469
29.0.90; project.el doesn't add menu-bar entries

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Fri, 12 May 2023 17:49:02 UTC

Severity: normal

Found in version 29.0.90

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #197 received at 63469 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: 63469 <at> debbugs.gnu.org
Subject: Re: bug#63469: 29.0.90; project.el doesn't add menu-bar entries
Date: Thu, 29 Jun 2023 20:31:02 +0300
> OK, here is such a patch:

Thanks, one comment:

> +    (bindings--define-key menu [project-dired]
> +      '(menu-item "Open Root Directory Of Project..." project-dired
> +                  :enable (menu-bar-non-minibuffer-window-p)
> +                  :help "Read the root directory of the current project, to operate on its files"))

There is an ellipsis at the end of the menu item that indicates
that the command reads a directory from the minibuffer.
So maybe a better command would be 'project-find-dir' that reads
a directory like its counterpart 'project-find-file' reads a file:

>      (bindings--define-key menu [dired]
>        '(menu-item "Open Directory..." dired
>                    :enable (menu-bar-non-minibuffer-window-p)
>                    :help "Read a directory, to operate on its files"))
> +    (bindings--define-key menu [project-open-file]
> +      '(menu-item "Open File In Project..." project-find-file
> +                  :enable (menu-bar-non-minibuffer-window-p)
> +                  :help "Read an existing file in the current project into an Emacs buffer"))
>      (bindings--define-key menu [open-file]
>        '(menu-item "Open File..." menu-find-file-existing
>                    :enable (menu-bar-non-minibuffer-window-p)

> @@ -1746,6 +1760,10 @@ menu-bar-encryption-decryption-menu
>  
>  (defvar menu-bar-shell-commands-menu
>    (let ((menu (make-sparse-keymap "Shell Commands")))
> +    (bindings--define-key menu [project-interactive-shell]
> +      '(menu-item "Run Shell Interactively In Project Root" project-shell

This will make the menu item too wide.  Would it be possible to omit
the word "Interactively".  I don't know why it's used in
"Run Shell Interactively", but "Run Shell In Project Root"
looks much nicer.

>      (bindings--define-key menu [interactive-shell]
>        '(menu-item "Run Shell Interactively" shell
>                    :help "Run a subshell interactively"))

>      (bindings--define-key menu [compile]
> -      '(menu-item "Compile..." compile
> -                  :help "Invoke compiler or Make, view compilation errors"))
> +      '(menu-item "Compile Buffer Directory..." compile
> +                  :help "Invoke compiler or Make in current buffer's directory, view errors"))

I think the text of the menu item "Compile Buffer Directory..."
is too hard to understand.  Probably better to retain the old text.




This bug report was last modified 2 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.