help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Where does a dir-local variable come from?


From: Eduardo Ochs
Subject: Where does a dir-local variable come from?
Date: Mon, 5 Sep 2022 05:58:12 -0300

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 via email to

[Prev in Thread] Current Thread [Next in Thread]