From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#17051: Order of evaluation in .dir-locals.el Date: Sat, 04 Dec 2021 04:19:16 +0100 Message-ID: <87fsr9rr9n.fsf@gnus.org> References: <20160607112313.GA3681@acm.fritz.box> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24169"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Reuben Thomas , 17051@debbugs.gnu.org, Noam Postavsky To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 04 04:20:14 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtLau-00063t-JO for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Dec 2021 04:20:12 +0100 Original-Received: from localhost ([::1]:36974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtLat-000702-84 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Dec 2021 22:20:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtLak-0006zO-1Q for bug-gnu-emacs@gnu.org; Fri, 03 Dec 2021 22:20:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41050) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtLaj-0002HW-Px; Fri, 03 Dec 2021 22:20:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mtLaj-0002El-IA; Fri, 03 Dec 2021 22:20:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sat, 04 Dec 2021 03:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17051 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: confirmed Original-Received: via spool by 17051-submit@debbugs.gnu.org id=B17051.16385879718548 (code B ref 17051); Sat, 04 Dec 2021 03:20:01 +0000 Original-Received: (at 17051) by debbugs.gnu.org; 4 Dec 2021 03:19:31 +0000 Original-Received: from localhost ([127.0.0.1]:52592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtLaF-0002Do-94 for submit@debbugs.gnu.org; Fri, 03 Dec 2021 22:19:31 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:59240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtLaD-0002DX-LP for 17051@debbugs.gnu.org; Fri, 03 Dec 2021 22:19:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XUHlQs3tQZQentv3voCo8x4344Tgejdv+dKRCUgGcmg=; b=Uu0L+aT4RY2xOaygzYoeZyk5ua fGSxX2rhaLK8j3NhkcvjKxTLpJRibpPu59p1lxAqHZj69tsLAe7JD4zjNgQHUiFn7eilImY54vTKP tzFwF5wtMosH8f3DMmgZm5U8lz/OwikvPjkXSE6IqKvHLH1zDMFS2068VTNe/lLFFrY8=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtLa2-0001gh-St; Sat, 04 Dec 2021 04:19:22 +0100 X-Now-Playing: Genesis's _Trespass_: "Dusk" In-Reply-To: <20160607112313.GA3681@acm.fritz.box> (Alan Mackenzie's message of "Tue, 7 Jun 2016 11:23:13 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:221424 Archived-At: Alan Mackenzie 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