From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#6731: Can tramp load .dir-locals.el in a project? Date: Mon, 02 Aug 2010 16:36:27 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1280759906 5925 80.91.229.12 (2 Aug 2010 14:38:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Aug 2010 14:38:26 +0000 (UTC) Cc: tramp-devel@gnu.org, 6731@debbugs.gnu.org To: Leo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 02 16:38:24 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofw9k-0007O4-Aa for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Aug 2010 16:38:20 +0200 Original-Received: from localhost ([127.0.0.1]:46606 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ofw9j-0006Fk-SJ for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Aug 2010 10:38:19 -0400 Original-Received: from [140.186.70.92] (port=53532 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ofw9S-0006B1-7B for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 10:38:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ofw9Q-0006ge-SO for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 10:38:02 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48388) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofw9Q-0006gX-QZ for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 10:38:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Ofw8V-0005dT-70; Mon, 02 Aug 2010 10:37:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Aug 2010 14:37:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6731 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6731-submit@debbugs.gnu.org id=B6731.128075976821574 (code B ref 6731); Mon, 02 Aug 2010 14:37:03 +0000 Original-Received: (at 6731) by debbugs.gnu.org; 2 Aug 2010 14:36:08 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofw7b-0005bv-Mr for submit@debbugs.gnu.org; Mon, 02 Aug 2010 10:36:08 -0400 Original-Received: from mailrelay2.alcatel.de ([194.113.59.96]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofw7Z-0005bZ-I7 for 6731@debbugs.gnu.org; Mon, 02 Aug 2010 10:36:06 -0400 Original-Received: from destgsu0048.de.alcatel-lucent.com (destgsu0048.de.alcatel-lucent.com [149.204.242.4]) by mailrelay2.alcatel.de (8.14.3/8.14.3/ICT) with ESMTP id o72EaRFb001897; Mon, 2 Aug 2010 16:36:27 +0200 Original-Received: from slbhn1.alcatel.de (slbhn1.de.alcatel-lucent.com [149.204.90.35]) by destgsu0048.de.alcatel-lucent.com (8.12.3/8.12.3) with ESMTP id o72EaRRZ013459; Mon, 2 Aug 2010 16:36:27 +0200 (MEST) In-Reply-To: (Leo's message of "Sun, 1 Aug 2010 13:25:50 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Alcanet-virus-scanned: o72EaRRZ013459 at destgsu0048.de.alcatel-lucent.com X-Scanned-By: MIMEDefang 2.64 on 149.204.45.73 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 02 Aug 2010 10:37:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:39151 Archived-At: Leo 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.=C2=B9 I think it is important enough for t= he > .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.