From unknown Fri Jun 13 09:58:23 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#1986 <1986@debbugs.gnu.org> To: bug#1986 <1986@debbugs.gnu.org> Subject: Status: dir-locals.el take precedence over user's mode-hook changes Reply-To: bug#1986 <1986@debbugs.gnu.org> Date: Fri, 13 Jun 2025 16:58:23 +0000 retitle 1986 dir-locals.el take precedence over user's mode-hook changes reassign 1986 emacs submitter 1986 Stefan Monnier severity 1986 wishlist thanks From rgm@gnu.org Wed Jan 21 19:00:07 2009 Received: (at quiet) by emacsbugs.donarmstrong.com; 22 Jan 2009 03:00:07 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=XIRONPORT,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0M303xJ024625 for ; Wed, 21 Jan 2009 19:00:05 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1LPpm4-0007nK-Ec for quiet@emacsbugs.donarmstrong.com; Wed, 21 Jan 2009 21:58:32 -0500 From: Stefan Monnier To: quiet@debbugs.gnu.org Subject: dir-locals.el take precedence over user's mode-hook changes Date: Wed, 24 Dec 2008 13:31:06 -0500 Lines: 23 X-From-Line: emacs-devel-bounces+rgm=gnu.org@gnu.org Wed Dec 24 13:30:54 2008 Received: from mail.gnu.org ([199.232.76.166]:45281 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LFYVS-0004Ho-88 for rgm@gnu.org; Wed, 24 Dec 2008 13:30:54 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LFYWJ-0000an-Dm for rgm@gnu.org; Wed, 24 Dec 2008 13:31:48 -0500 Received: from lists.gnu.org ([199.232.76.165]:51917) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LFYWI-0000aQ-SH for rgm@gnu.org; Wed, 24 Dec 2008 13:31:46 -0500 Received: from localhost ([127.0.0.1]:55683 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LFYWI-0004Wy-J0 for rgm@gnu.org; Wed, 24 Dec 2008 13:31:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LFYVl-0004Vc-7I for emacs-devel@gnu.org; Wed, 24 Dec 2008 13:31:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LFYVi-0004VO-RO for emacs-devel@gnu.org; Wed, 24 Dec 2008 13:31:11 -0500 Received: from [199.232.76.173] (port=38511 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LFYVi-0004VL-JM for emacs-devel@gnu.org; Wed, 24 Dec 2008 13:31:10 -0500 Received: from ironport2-out.pppoe.ca ([206.248.154.182]:39569 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LFYVh-0000Pv-S0 for emacs-devel@gnu.org; Wed, 24 Dec 2008 13:31:10 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtUEAO8OUklFxKfZ/2dsb2JhbACBbL05WJB9hkKBZw X-IronPort-AV: E=Sophos;i="4.36,279,1228107600"; d="scan'208";a="31456278" Received: from 69-196-167-217.dsl.teksavvy.com (HELO pastel.home) ([69.196.167.217]) by ironport2-out.teksavvy.com with ESMTP; 24 Dec 2008 13:31:06 -0500 Received: by pastel.home (Postfix, from userid 20848) id 180F58780; Wed, 24 Dec 2008 13:31:06 -0500 (EST) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-Debbugs-No-Ack: yes X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+rgm=gnu.org@gnu.org X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Message-ID: <3nljt4yrl3.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Glenn Morris [ resent from http://lists.gnu.org/archive/html/emacs-devel/2008-12/msg00919.html ] It seems that the dir-local.el settings are applied after the major mode hook has been run. That makes it pretty impossible for the user to override them, which is problematic (I noticed it because I use a tab-width of 4 in my (Emacs) ChangeLog files and now tab-width is back to 8). I guess it's the same problem as the one of setting file-local variables, but for directories it's even worse. We should provide some way to override those settings. Currently, I add a hook to hack-local-variables-hook from within my mode-hook, which works but isn't the most obvious. So we should at least document this workaround. Maybe we should also provide an option inhibit-file-local-variables which contains a list of variables that hack-local-variables would have to ignore. Stefan From rgm@gnu.org Tue Feb 24 12:29:51 2009 Received: (at control) by emacsbugs.donarmstrong.com; 24 Feb 2009 20:29:51 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.0 required=4.0 tests=VALID_BTS_CONTROL, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1OKTnmn007085 for ; Tue, 24 Feb 2009 12:29:50 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Lc3sK-0003T8-Ma; Tue, 24 Feb 2009 15:27:32 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18852.22580.606810.864200@fencepost.gnu.org> Date: Tue, 24 Feb 2009 15:27:32 -0500 From: Glenn Morris To: control Subject: control message X-Debbugs-No-Ack: yes reassign 2431 emacs,gnus close 1988 severity 1986 wishlist severity 1223 minor