unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Where does a dir-local variable come from?
@ 2022-09-05  8:58 Eduardo Ochs
  2022-09-05 11:47 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Eduardo Ochs @ 2022-09-05  8:58 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-06  3:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-05  8:58 Where does a dir-local variable come from? Eduardo Ochs
2022-09-05 11:47 ` Eli Zaretskii
2022-09-06  2:59   ` Eduardo Ochs
2022-09-06  3:27     ` Emanuel Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).