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: Dmitry Gutov <dmitry <at> gutov.dev>
To: Juri Linkov <juri <at> linkov.net>, Eli Zaretskii <eliz <at> gnu.org>
Cc: sbaugh <at> janestreet.com, 63469 <at> debbugs.gnu.org
Subject: bug#63469: 29.0.90; project.el doesn't add menu-bar entries
Date: Mon, 22 May 2023 22:59:50 +0300
On 22/05/2023 20:48, Juri Linkov wrote:
> +;;;###autoload
> +(define-minor-mode project-mode
> +  "Toggle display of project menu in the project-aware buffers."
> +  (if project-mode
> +      (setq-local project-name (concat
> +	                        " "
> +	                        (propertize
> +	                         (project-name (project-current))
> +	                         'mouse-face 'mode-line-highlight
> +	                         'local-map project-mode-line-map)))))

At the very least, this will need some better name, because project 
features don't need any mode to be turned on to be used.

project-menu-mode?

Next, I'm not quite sure about the caching of project-name. There is no 
scenario when it will be invalidated, right?

Try simply calling (project-name (project-current t)) every time, see 
how the performance is. Or, more thoroughly, copy the if-let logic from 
project-prefixed-buffer-name.




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.