GNU bug report logs - #6731
23.2; remote .dir-locals.el

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Mon, 26 Jul 2010 14:30:03 UTC

Severity: normal

Tags: patch

Merged with 1933

Found in version 23.2

Fixed in version 24.2

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 6731 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Leo <sdl.web <at> gmail.com>
Cc: tramp-devel <at> gnu.org, 6731 <at> debbugs.gnu.org
Subject: Re: Can tramp load .dir-locals.el in a project?
Date: Mon, 02 Aug 2010 16:36:27 +0200
Leo <sdl.web <at> gmail.com> writes:

> On 2010-05-20 17:04 +0100, Michael Albinus wrote:
>> | 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.  (To
>> | avoid slowdown, this search is skipped for remote files.)
>>
>> I wouldn't like to overrule this on my own. If you believe it is
>> important, you might ask on the emacs-devel mailing list for this. Maybe
>> one could enable this by a custom variable.
>
> I have reported this as a bug.ยน I think it is important enough for the
> .dir-locals.el to be loaded, otherwise, users end up editing files in a
> way non-conforming to the requirement of a project and editing is the
> most important reason to use tramp for the comfort of Emacs.
>
> Would be interesting to hear your thought and input. Thanks.

Loading .dir-locals.el is a non-trivial operation, because several
directories must be traversed for existence check of such a file,
starting at the current directory, and navigating up to "/". This might
be time-consuming.

I suspect, this is the reason it has been disabled for remote
directories.

One could improve the checks by adding a new file name handler for
searching and loading of .dir-locals.el. This would allow to apply all
checks at once on the remote side, with a better performance.

A similar file name handler was introduced for `vc-registered', which
was improved by a special implementation for remote files.

> Kind regards,
> Leo

Best regards, Michael.




This bug report was last modified 12 years and 355 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.