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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: dmitry <at> gutov.dev, 63469 <at> debbugs.gnu.org, sbaugh <at> janestreet.com
Subject: bug#63469: 29.0.90; project.el doesn't add menu-bar entries
Date: Fri, 19 May 2023 13:44:39 +0300
> From: Juri Linkov <juri <at> linkov.net>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  Spencer Baugh <sbaugh <at> janestreet.com>,
>   63469 <at> debbugs.gnu.org
> Date: Fri, 19 May 2023 09:56:31 +0300
> 
> This mode is intended for anyone who wants to show the menu
> only in project-supported buffers.  To do this, they need to
> enable `global-project-mode':
> 
> ```patch
> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
> index 7c51778d5d4..e6dc7aea9ca 100644
> --- a/lisp/progmodes/project.el
> +++ b/lisp/progmodes/project.el
> @@ -1883,5 +1883,30 @@ project-switch-project
>      (let ((project-current-directory-override dir))
>        (call-interactively command))))
>  
> +(easy-menu-define project-mode-menu project-prefix-map
> +  "Menu for `project-mode' buffers."
> +  '("Project"
> +    ["List buffers" project-list-buffers
> +     :help "List project buffers"]
> +    ;; ...
> +    ))
> +
> +;;;###autoload
> +(define-minor-mode project-mode
> +  "Toggle display of project menu in the project-aware buffers."
> +  :lighter " Pro"
> +  :keymap (define-keymap "<menu-bar>" project-mode-menu))

If this mode is only for showing the menu, then at least the mode's
name should reflect that.

And once again: I don't think I see the justification to have a minor
mode whose only job is to show a menu-bar menu.  I'm not even sure why
we need to have a project-mode at all: AFAIU the project.el features
are always available, so no mode is needed.





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.