From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Blunderbuss ".dir-locals.el" raises everything in its path!! Date: Mon, 13 Jul 2009 07:36:44 +0000 Message-ID: <20090713073644.GB1803@muc.de> References: <20090712144137.GB2524@muc.de> <87hbxhony6.fsf@stupidchicken.com> <20090712180623.GA1009@muc.de> <4A5A2BE1.3050206@harpegolden.net> <20090712213909.GC1009@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1247474114 17566 80.91.229.12 (13 Jul 2009 08:35:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Jul 2009 08:35:14 +0000 (UTC) Cc: Chong Yidong , Jan =?iso-8859-1?Q?Dj=E4rv?= , emacs-devel@gnu.org, David De La Harpe Golden To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 13 10:35:06 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MQH05-0001x1-8X for ged-emacs-devel@m.gmane.org; Mon, 13 Jul 2009 10:35:05 +0200 Original-Received: from localhost ([127.0.0.1]:57241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQH02-0003Ia-BG for ged-emacs-devel@m.gmane.org; Mon, 13 Jul 2009 04:35:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQGzw-0003IV-HP for emacs-devel@gnu.org; Mon, 13 Jul 2009 04:34:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQGzq-0003IJ-PO for emacs-devel@gnu.org; Mon, 13 Jul 2009 04:34:55 -0400 Original-Received: from [199.232.76.173] (port=39882 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQGzq-0003IG-KP for emacs-devel@gnu.org; Mon, 13 Jul 2009 04:34:50 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:4142 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MQGzq-00052B-0W for emacs-devel@gnu.org; Mon, 13 Jul 2009 04:34:50 -0400 Original-Received: (qmail 75981 invoked by uid 3782); 13 Jul 2009 07:34:47 -0000 Original-Received: from acm.muc.de (pD9E504D6.dip.t-dialin.net [217.229.4.214]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Mon, 13 Jul 2009 09:34:44 +0200 Original-Received: (qmail 2468 invoked by uid 1000); 13 Jul 2009 07:36:45 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 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: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:112402 Archived-At: Hi, Lennart! On Mon, Jul 13, 2009 at 12:22:03AM +0200, Lennart Borgman wrote: > On Sun, Jul 12, 2009 at 11:39 PM, Alan Mackenzie wrote: > > I find myself opposed to the .dir-locals.el mechanism.  Unlike the > > file local variables mechanism, which is used for a definite purpose > > and is under the control of the hacker editing the file, > > .dir-locals.el takes control away from hackers, it's surreptitious > > (ls won't list it unless you give it -a, and often it's not even in > > the same directory), and it tends to lead hackers on a frustrating, > > time wasting search for why their Emacs is doing strange things, as > > it just has done for Jan.  Kudos to Jan for taking the time and > > trouble to track the problem down. > It looks to me that many want some kind of project settings and is not > that what .dir-locals.el is supposed to contain? (But why does the > name start with a dot?) Yes. But it differs from all other Emacs configuration in that it is strangely outwith the control of the person running Emacs. There isn't even a flag to disable it. Or have I missed this option? > > I think project settings would be better done in the traditional > > manner by putting lisp functions into major mode hooks.  Both > > require elisp skills after all, so I can't really see what > > .dir-locals.el saves. > Maybe I do not understand what you mean, but is not the real trouble > that those things can be confused? Major mode settings and project > settings are of course two different dimensions. Orthogonal. Are they? The following (from page "Config Basics" in the CC Mode manual) shows what I mean: (defun my-c-mode-hook () (c-set-style (if (and (buffer-file-name) (string-match "/usr/src/linux" (buffer-file-name))) "linux" "free-group-style"))) (add-hook 'c-mode-hook 'my-c-mode-hook) [ .... ] > > AARRRGGGGHHHH!!!  As if we don't don't have enough complexity as it is. > We are supposed to grow with it... We're supposed to fight it on the beaches, ...... ;-) -- Alan Mackenzie (Nuremberg, Germany).