* File-local and directory-local variable thoughts
@ 2022-10-11 22:31 Perry Smith
2022-10-14 13:43 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 2+ messages in thread
From: Perry Smith @ 2022-10-11 22:31 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]
In the past, I wanted to set rspec-spec-command in a .dir-locals.el file but when I did, I got the question if I wanted to apply the list every time I loaded a file or reloaded a file or reloaded a directory.
I download a lot of gunk from the internet. Mostly source code to help me understand things. So… I really don’t want to globally say “yes, it is safe to set this variable”. What I’d prefer to say is “Yes, I want to set this variable to this value within this directory (or file).
So how about keeping a directory (or file) to hash list? The hash would be for the entire .dir-locals.el file and the equivalent for file local variables.
Then, as a first check, if the directory / hash pair is found, it is deemed trust worthy and processed. Else, the current implementation is used perhaps with the alteration that the ‘!’ and ‘I’ options are always presented and when the ‘!’ Is given, it will add the appropriate directory / hash to the list.
Thoughts?
Thank you for your time.
p.s. I halfway expect someone to see “Oh… that’s the blah dirs local package here…” which is partly why I’m asking.
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: File-local and directory-local variable thoughts
2022-10-11 22:31 File-local and directory-local variable thoughts Perry Smith
@ 2022-10-14 13:43 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2022-10-14 13:43 UTC (permalink / raw)
To: help-gnu-emacs
> In the past, I wanted to set rspec-spec-command in a .dir-locals.el file but
> when I did, I got the question if I wanted to apply the list every time
> I loaded a file or reloaded a file or reloaded a directory.
>
> I download a lot of gunk from the internet. Mostly source code to help me
> understand things. So… I really don’t want to globally say “yes, it is safe
> to set this variable”.
Nitpick: this is not quite what Emacs is asking. The question is only
whether "it is safe to set this variable *to this value*".
> What I’d prefer to say is “Yes, I want to set this
> variable to this value within this directory (or file).
Is the restriction to a specific value precise enough to assuage your
concerns?
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-14 13:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-11 22:31 File-local and directory-local variable thoughts Perry Smith
2022-10-14 13:43 ` Stefan Monnier via Users list for the GNU Emacs text editor
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.