From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 59384@debbugs.gnu.org, Juri Linkov <juri@linkov.net>
Subject: bug#59384: 29.0.50; Visiting files in Emacs Git pops up "unsafe variable" prompt
Date: Sat, 19 Nov 2022 17:38:35 -0500 [thread overview]
Message-ID: <jwvv8na60b4.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83pmdi7mx2.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 19 Nov 2022 21:40:41 +0200")
>> From: Juri Linkov <juri@linkov.net>
>> Cc: 59384@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
next prev parent reply other threads:[~2022-11-19 22:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-19 12:59 bug#59384: 29.0.50; Visiting files in Emacs Git pops up "unsafe variable" prompt Eli Zaretskii
2022-11-19 18:49 ` Juri Linkov
2022-11-19 19:40 ` Eli Zaretskii
2022-11-19 22:38 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-11-20 10:12 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvv8na60b4.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=59384@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=juri@linkov.net \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.