all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eduardo Ochs <eduardoochs@gmail.com>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Where does a dir-local variable come from?
Date: Mon, 5 Sep 2022 05:58:12 -0300	[thread overview]
Message-ID: <CADs++6ivPricQNzW_B6N=xpvMFQaReNx34-grQiz6gUrnJr9=A@mail.gmail.com> (raw)

Hi list,

is there a good low-level way to discover where a certain dir-local
variable "comes from"? For example, in my machine these two files

  /home/edrx/.dir-locals.el
  /home/edrx/eev-current/.dir-locals.el

specify different values for the variable `ee-preferred-c', and so I
(usually) have at least two different entries in
`dir-locals-class-alist' that mention `ee-preferred-c'. They can be
accessed with:

  (alist-get '/home/edrx/             dir-locals-class-alist)
  (alist-get '/home/edrx/eev-current/ dir-locals-class-alist)

I am looking for code that parses the value of
`dir-locals-class-alist', and that can say things like "the dir-local
variable `ee-preferred-c' appears in the entries for
/home/edrx/eev-current/, /home/edrx/, and /home/edrx/dednat6/ of
`dir-locals-class-alist'; as your current directory is
/home/edrx/eev-current/experimental/ then the entries for
/home/edrx/eev-current/ and /home/edrx/ are relevant here, and the one
in /home/edrx/eev-current/ is the one that takes precedence"...

  Thanks in advance!
    Eduardo Ochs
    http://angg.twu.net/#eev



             reply	other threads:[~2022-09-05  8:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05  8:58 Eduardo Ochs [this message]
2022-09-05 11:47 ` Where does a dir-local variable come from? Eli Zaretskii
2022-09-06  2:59   ` Eduardo Ochs
2022-09-06  3:27     ` Emanuel Berg

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='CADs++6ivPricQNzW_B6N=xpvMFQaReNx34-grQiz6gUrnJr9=A@mail.gmail.com' \
    --to=eduardoochs@gmail.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.