unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Alan Mackenzie <acm@muc.de>
Cc: Reuben Thomas <rrt@sc3d.org>,
	17051@debbugs.gnu.org,
	Noam Postavsky <npostavs@users.sourceforge.net>
Subject: bug#17051: Order of evaluation in .dir-locals.el
Date: Sat, 04 Dec 2021 04:19:16 +0100	[thread overview]
Message-ID: <87fsr9rr9n.fsf@gnus.org> (raw)
In-Reply-To: <20160607112313.GA3681@acm.fritz.box> (Alan Mackenzie's message of "Tue, 7 Jun 2016 11:23:13 +0000")

Alan Mackenzie <acm@muc.de> writes:

>> When I first visit a file under that project, I get the error: "Undefined
>> style: fontforge"
>
> I don't think the order of evaluation of variables in .dir-locals.el is
> defined.  The code (in .../lisp/files.el) is not easy to understand.  It
> could well be that, for that first file, the c-file-style is being
> applied before it has been defined.

Yes, I don't think the order is well-defined -- the manual talks about
priorities:

---
If the @file{.dir-locals.el} file contains multiple different values
for a variable using different mode names or directories, the values
will be applied in an order such that the values for more specific
modes take priority over more generic modes.  Values specified under a
directory have even more priority. 
---

but I don't see anything about the order.

However, there's the .dir-locals-2.el file -- it'll be run after the
first file, so using that would solve the original use case, I think?

But I don't think there's anything here to fix here, so I'm closing this
bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





      parent reply	other threads:[~2021-12-04  3:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-20 15:01 bug#17051: Order of evaluation in .dir-locals.el Reuben Thomas
2016-06-04 22:02 ` Noam Postavsky
2016-06-05 19:38   ` Reuben Thomas
2016-06-07  0:41     ` Noam Postavsky
2016-06-07 11:23 ` Alan Mackenzie
     [not found] ` <20160607112313.GA3681@acm.fritz.box>
2016-06-07 12:53   ` Reuben Thomas
2021-12-04  3:19   ` Lars Ingebrigtsen [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fsr9rr9n.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=17051@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=npostavs@users.sourceforge.net \
    --cc=rrt@sc3d.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).