[Top][All Lists]
[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: |
Mon, 13 Jul 2009 07:36:44 +0000 |
User-agent: |
Mutt/1.5.9i |
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<address@hidden> 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).
- Blunderbuss ".dir-locals.el" raises everything in its path!!, Alan Mackenzie, 2009/07/12
- Add file-locals and dir-locals (was: Blunderbuss ".dir-locals.el" raises everything in its path!!), Juri Linkov, 2009/07/16
- Re: Add file-locals and dir-locals, martin rudalics, 2009/07/17
- Re: Add file-locals and dir-locals, Juri Linkov, 2009/07/17
- Re: Add file-locals and dir-locals, martin rudalics, 2009/07/18
- Re: Add file-locals and dir-locals, Juri Linkov, 2009/07/18
- Re: Add file-locals and dir-locals, martin rudalics, 2009/07/19
- Re: Add file-locals and dir-locals, Juri Linkov, 2009/07/19
- Re: Add file-locals and dir-locals, Leo, 2009/07/20
- Re: Add file-locals and dir-locals, Juri Linkov, 2009/07/21