all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Is there any possibility recursively by dir propagate Emacs settings like .dir-locals.el per dir?
@ 2010-12-28 22:09 Oleksandr Gavenko
  2010-12-28 22:30 ` Oleksandr Gavenko
  0 siblings, 1 reply; 3+ messages in thread
From: Oleksandr Gavenko @ 2010-12-28 22:09 UTC (permalink / raw
  To: help-gnu-emacs

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.

-- 
Best regards!




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is there any possibility recursively by dir propagate Emacs settings like .dir-locals.el per dir?
  2010-12-28 22:09 Is there any possibility recursively by dir propagate Emacs settings like .dir-locals.el per dir? Oleksandr Gavenko
@ 2010-12-28 22:30 ` Oleksandr Gavenko
  2010-12-29 11:48   ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Oleksandr Gavenko @ 2010-12-28 22:30 UTC (permalink / raw
  To: help-gnu-emacs

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!




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is there any possibility recursively by dir propagate Emacs settings like .dir-locals.el per dir?
  2010-12-28 22:30 ` Oleksandr Gavenko
@ 2010-12-29 11:48   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2010-12-29 11:48 UTC (permalink / raw
  To: help-gnu-emacs

> From: Oleksandr Gavenko <gavenkoa@gmail.com>
> Date: Wed, 29 Dec 2010 00:30:36 +0200
> 
> 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.

Emacs uses I).  See locate-dominating-file.

> If I) right how deep .dir-locals.el can include upper .dir-locals.el?

I don't think you can.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-29 11:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-28 22:09 Is there any possibility recursively by dir propagate Emacs settings like .dir-locals.el per dir? Oleksandr Gavenko
2010-12-28 22:30 ` Oleksandr Gavenko
2010-12-29 11:48   ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.