[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is there any possibility recursively by dir propagate Emacs settings
From: |
Oleksandr Gavenko |
Subject: |
Re: Is there any possibility recursively by dir propagate Emacs settings like .dir-locals.el per dir? |
Date: |
Wed, 29 Dec 2010 00:30:36 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 |
On 2010-12-29 0:09, Oleksandr Gavenko wrote:
Is there any possibility recursively by dir propagate Emacs settings
like .dir-locals.el per dir?
For example it is useful set file encoding in root of software project
instead per file (-*-...-*-)/dir (.dir-locals.el) settings.
Some answer I found in manual:
If you put a file with a special name `.dir-locals.el'(1) in a
directory, Emacs will read it when it visits any file in that directory
or any of its subdirectories, and apply the settings it specifies to
the file's buffer. Emacs searches for `.dir-locals.el' starting in the
directory of the visited file, and moving up the directory tree.
I have question how this work:
I) 1. visit to file
2. check for ./.dir-locals.el
3. if ./.dir-locals.el not found, check for ../.dir-locals.el
4. if ../.dir-locals.el not found, check for ../../.dir-locals.el
...
or
II) 1. visit to file
2. check for ./.dir-locals.el
3. check for ../.dir-locals.el
4. check for ../../.dir-locals.el
...
I like II) variant.
If I) right how deep .dir-locals.el can include upper .dir-locals.el?
I check this myself in morning, but now time to sleep...
--
Best regards!