GNU bug report logs - #1986
dir-locals.el take precedence over user's mode-hook changes

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Stefan Monnier <monnier@HIDDEN>; dated Thu, 22 Jan 2009 03:05:08 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to `wishlist' from `normal' Request was from Glenn Morris <rgm@HIDDEN> to control@HIDDEN. Full text available.

Message received at quiet@HIDDEN:


Received: (at quiet) by emacsbugs.donarmstrong.com; 22 Jan 2009 03:00:07 +0000
From rgm@HIDDEN Wed Jan 21 19:00:07 2009
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 <quiet@HIDDEN>; Wed, 21 Jan 2009 19:00:05 -0800
Received: from rgm by fencepost.gnu.org with local (Exim 4.67)
	(envelope-from <rgm@HIDDEN>)
	id 1LPpm4-0007nK-Ec
	for quiet@HIDDEN; Wed, 21 Jan 2009 21:58:32 -0500
From: Stefan Monnier <monnier@HIDDEN>
To: quiet <at> 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@HIDDEN  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 <emacs-devel-bounces+rgm=gnu.org@HIDDEN>)
	id 1LFYVS-0004Ho-88
	for rgm@HIDDEN; 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 <emacs-devel-bounces+rgm=gnu.org@HIDDEN>)
	id 1LFYWJ-0000an-Dm
	for rgm@HIDDEN; 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 <emacs-devel-bounces+rgm=gnu.org@HIDDEN>)
	id 1LFYWI-0000aQ-SH
	for rgm@HIDDEN; 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@HIDDEN; 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@HIDDEN; 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@HIDDEN; 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@HIDDEN; 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 <monnier@HIDDEN>) id 1LFYVh-0000Pv-S0
	for emacs-devel@HIDDEN; 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@HIDDEN
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/emacs-devel>,
	<mailto:emacs-devel-request@HIDDEN?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/emacs-devel>
List-Post: <mailto:emacs-devel@HIDDEN>
List-Help: <mailto:emacs-devel-request@HIDDEN?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/emacs-devel>,
	<mailto:emacs-devel-request@HIDDEN?subject=subscribe>
Errors-To: emacs-devel-bounces+rgm=gnu.org@HIDDEN
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4)
Message-ID: <3nljt4yrl3.fsf@HIDDEN>
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 <rgm@HIDDEN>

[ 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




Report stored :
bug#1986; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.