GNU bug report logs -
#59384
29.0.50; Visiting files in Emacs Git pops up "unsafe variable" prompt
Previous Next
Reported by: Eli Zaretskii <eliz <at> gnu.org>
Date: Sat, 19 Nov 2022 13:00:02 UTC
Severity: normal
Found in version 29.0.50
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: Juri Linkov <juri <at> linkov.net>
>> Cc: 59384 <at> debbugs.gnu.org
>> Date: Sat, 19 Nov 2022 20:49:50 +0200
>>
>> > vc-git-annotate-switches : "-w"
>> > bug-reference-url-format : "https://debbugs.gnu.org/%s"
>> > diff-add-log-use-relative-names : t
>> > * vc-prepare-patches-separately : nil
>> > c-file-style : "GNU"
>> > c-noise-macro-names : ("INLINE" "NO_INLINE" "ATTRIBUTE_NO_SANITIZE_UNDEFINED" "UNINIT" "CALLBACK" "ALIGN_STACK")
>> > electric-quote-comment : nil
>> > electric-quote-string : nil
>> > indent-tabs-mode : t
>> > mode : bug-reference-prog
>> >
>> > The problem here AFAIU is that vc-prepare-patches-separately and its
>> > 'safep' property is not known to Emacs until vc.el is loaded.
>> >
>> > One way of fixing this would be to autoload the defcustom of this
>> > variable, but AFAIR this is sometimes frowned upon?
>>
>> Is there a standard solution already worked out for existing
>> variables like `vc-git-annotate-switches'?
>
> Maybe it is, but if so, I'm not aware of it.
>
> Stefan, any advice?
AFAIK the standard solution is one of:
- try to arrange for the relevant package to be loaded before
hack-local-variables does its thing. That often works for
major-mode dependent variables, where we try and load the
major mode early enough. For the above case I can't see a good way to
use this approach.
- autoload the (put '<VAR> 'safe-local-variable ...)
Autoloading the `defcustom` is a *bad* idea.
Stefan
This bug report was last modified 2 years and 184 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.