emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Blunderbuss ".dir-locals.el" raises everything in its path!!


From: Alan Mackenzie
Subject: Re: Blunderbuss ".dir-locals.el" raises everything in its path!!
Date: Sun, 12 Jul 2009 21:39:09 +0000
User-agent: Mutt/1.5.9i

Hi, David!

On Sun, Jul 12, 2009 at 07:30:57PM +0100, David De La Harpe Golden wrote:
> Alan Mackenzie wrote:

> >Yes, we both agree on what is happening.  My point is that the
> >contents of .dir-locals.el should not override explicit values given
> >by the user in his .emacs.

> Sorry, but isn't the point of .dir-locals.el to override settings on a
> project tree specific basis, like file locals only for whole directory
> trees? Wouldn't it'd be weird if .emacs "won" ?

Please have a look at Jan's bug#3808 to see the exact problem he hit.

One of the more subtle problems of CC Mode is that it "styles" contain
preferences as well as settings.

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.

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.

> I mean, I can see that yes, one might ALSO want a different kind of 
> .dir-local.el or file-local setting that doesn't (In the common lisp 
> case that could be handled by defvar vs. defparameter, say...)

AARRRGGGGHHHH!!!  As if we don't don't have enough complexity as it is.

> (The thing that irritates me about dir-locals is their syntactic
> incompatiblity with file-locals.   If I want to promote a file local
> I've been setting on a bunch of files to directory local, AFAIK I need
> to rejig the syntax.)

I'm not convinced this is a bad thing.  They're utterly different things,
even though their implementation is almost the same.  File locals are an
exquisite precision weapon.  Dir locals are a blunderbuss.

-- 
Alan Mackenzie (Nuremberg, Germany).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]