From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.help 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 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1293575506 25350 80.91.229.12 (28 Dec 2010 22:31:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 28 Dec 2010 22:31:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 28 23:31:37 2010 Return-path: Envelope-to: geh-help-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 1PXi4v-0003aE-Ag for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Dec 2010 23:31:37 +0100 Original-Received: from localhost ([127.0.0.1]:54230 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PXi4u-00071s-Px for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Dec 2010 17:31:36 -0500 Original-Received: from [140.186.70.92] (port=50728 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PXi4T-00070d-JN for help-gnu-emacs@gnu.org; Tue, 28 Dec 2010 17:31:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PXi4M-0006AN-7o for help-gnu-emacs@gnu.org; Tue, 28 Dec 2010 17:31:09 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:49728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PXi4L-0006AD-O4 for help-gnu-emacs@gnu.org; Tue, 28 Dec 2010 17:31:02 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PXi4J-0003Mn-P0 for help-gnu-emacs@gnu.org; Tue, 28 Dec 2010 23:30:59 +0100 Original-Received: from 105-123-92-178.pool.ukrtel.net ([178.92.123.105]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Dec 2010 23:30:59 +0100 Original-Received: from gavenkoa by 105-123-92-178.pool.ukrtel.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Dec 2010 23:30:59 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 105-123-92-178.pool.ukrtel.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:77945 Archived-At: 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!