all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Perry Smith <pedz@easesoftware.com>
To: help-gnu-emacs@gnu.org
Subject: File-local and directory-local variable thoughts
Date: Tue, 11 Oct 2022 17:31:44 -0500	[thread overview]
Message-ID: <255248B3-80CD-49CB-BB50-C3610B735C26@easesoftware.com> (raw)

[-- 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 --]

             reply	other threads:[~2022-10-11 22:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11 22:31 Perry Smith [this message]
2022-10-14 13:43 ` File-local and directory-local variable thoughts Stefan Monnier via Users list for the GNU Emacs text editor

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=255248B3-80CD-49CB-BB50-C3610B735C26@easesoftware.com \
    --to=pedz@easesoftware.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.