GNU bug report logs -
#63469
29.0.90; project.el doesn't add menu-bar entries
Previous Next
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 #185 received at 63469 <at> debbugs.gnu.org (full text, mbox):
On 02/06/2023 09:37, Juri Linkov wrote:
> Sorry that I noticed this only now, but would such optimization make sense?
> Instead of
>
> (cl-defmethod project-name ((project (head vc)))
> (or (project--value-in-dir 'project-vc-name (project-root project))
> (cl-call-next-method)))
>
> first check if .dir-local.el already assigned a buffer-local value
> before trying to get it from the root:
>
> (cl-defmethod project-name ((project (head vc)))
> (or project-vc-name
> (project--value-in-dir 'project-vc-name (project-root project))
> (cl-call-next-method)))
It might, but this way you lose one of the niceties of relying on
'project--value-in-dir': an edit to .dir-locals.el takes effect
automatically in all related buffers, without having to revert them. It
might not be too important, of course.
Another thing, though, is that will do nothing about the worst case:
when project-vc-name has not been customized or set locally. So if
project--value-in-dir doesn't work fast enough for some particular
purpose (such as using project name in the mode-line), it will remain a
problem for many buffers anyway.
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.