bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Juri Linkov
Subject: bug#63469: 29.0.90; project.el doesn't add menu-bar entries
Date: Wed, 24 May 2023 09:29:18 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>>> Maybe in .dir-locals.el.  Actually this works:
>>>
>>>    ((nil . ((project-vc-name . "emacs-29"))))
>>>
>>> Not sure why non-VC projects can't be named the same way.
>> And indeed this is a real problem: in file buffers there is
>> one project name that comes from project-vc-name, and in
>> non-file buffers another project name deduced from dirs.
>
> Are you saying that non-file buffers don't obey the value of
> project-vc-name set in parent dir's dir-locals.el?

Exactly.  I see no way to set the same project name both for
non-file and file buffers.

>> This distinction became visible while testing project-mode
>> on the mode-line.
>>
>>> Also noticed that project-vc-name is not marked as safe,
>>> so always asks a confirmation.
>> This problem exists only until project.el is loaded.
>> So maybe the 'safe' cookie should be in ###autoload.
>
> Possibly. Would that mean that all :safe attribute assignments should be
> moved outside of defcustom forms, though?
>
> There is a whole bunch of them in project.el alone, most of them are
> expected to be settable from .dir-locals.el (that's the only point of this
> attribute).

I tried out other defcustoms, and indeed all they require confirmation:
project-vc-ignores, project-vc-merge-submodules,
project-vc-include-untracked, project-vc-name,
project-vc-extra-root-markers, project-kill-buffers-display-buffer-list.

The standard solution is just to use e.g.:

;;;###autoload(put 'compilation-directory 'safe-local-variable 'stringp)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]