GNU bug report logs - #15252
dir-locals: superdir (or parentdir) support

Previous Next

Package: emacs;

Reported by: Jambunathan K <kjambunathan <at> gmail.com>

Date: Tue, 3 Sep 2013 03:38:02 UTC

Severity: wishlist

Done: Jambunathan K <kjambunathan <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15252 in the body.
You can then email your comments to 15252 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15252; Package emacs. (Tue, 03 Sep 2013 03:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jambunathan K <kjambunathan <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 03 Sep 2013 03:38:02 GMT) Full text and rfc822 format available.

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

From: Jambunathan K <kjambunathan <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: dir-locals: superdir (or parentdir) support
Date: Tue, 03 Sep 2013 09:09:15 +0530
Introductory word:

I am having a private library that implements a unified search
interface.  It will use `cscope' as search engine while visiting *.[ch]
files and `rgrep' as search engine while visiting *.el files.  

The search as it stands will be on the whole of search tree.

It is "specified" in as .dir-locals.el as below.


~/src/emacs/trunk/.dir-locals.el:

    ((c-mode
      (search-dir . "~/src/emacs/trunk/")
      (search-engine . cscope))
     (emacs-lisp-mode
      (search-dir . "~/src/emacs/trunk/lisp")
      (search-engine . rgrep)))

----------------------------------------------------------------

Problem:


If I am visiting an Org file (say trunk/lisp/org/org.el), the recursive
search *on whole lisp tree* happens just fine.

But if I am visiting a Gnus file (say trunk/lisp/org/org.el), the
recursive search fails.


----------------------------------------------------------------

Diagnosis:


The reason is this because Gnus has it's own .dir-locals.el for lisp
files.

~/src/emacs/trunk/lisp/gnus/.dir-locals.el:

    ((emacs-lisp-mode . ((show-trailing-whitespace . t))))


----------------------------------------------------------------

What I need:

So to realize my use case, I want that the "emacs-lisp-mode" settings
from Gnus tree be merged with that specified from trunk.

----------------------------------------------------------------

One possible way to achieve it:


Introduce a `superdir' or a `parentdir' keyword, to traverse till the
root.

~/src/emacs/trunk/lisp/gnus/.dir-locals.el:

    ((emacs-lisp-mode . ((show-trailing-whitespace . t)
			 (superdir . t) ; <=====================
			 )))


Compare `superdir' to the already existing `subdir'.  From 

(info "(emacs) Directory Variables")

    ((c-mode . ((c-file-style . "BSD")
                (subdirs . nil) ; <=====================
                )))

----------------------------------------------------------------

Closing note:

Particularly useful for "submodules" which are part of a "sumo" project.








Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15252; Package emacs. (Tue, 03 Sep 2013 06:40:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: 15252 <at> debbugs.gnu.org
Subject: Re: bug#15252: dir-locals: superdir (or parentdir) support
Date: Tue, 03 Sep 2013 02:39:24 -0400
Known issue, eg

http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00663.html

(Copyright assigned) patches for dir-locals inheritance welcome.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15252; Package emacs. (Sat, 14 Sep 2013 08:44:02 GMT) Full text and rfc822 format available.

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

From: Jambunathan K <kjambunathan <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 15252 <at> debbugs.gnu.org
Subject: Re: bug#15252: dir-locals: superdir (or parentdir) support
Date: Sat, 14 Sep 2013 14:15:16 +0530
Glenn

Glenn Morris <rgm <at> gnu.org> writes:

> (Copyright assigned) patches

Always vigilant!

I thought Emacs project has my future assingments on paper.  As far as
my understanding of law goes, the annulment of contract doesn't take
effect until it is signed off both the parties.

Anyways...

Jambunathan K.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15252; Package emacs. (Sat, 14 Sep 2013 09:39:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jambunathan K <kjambunathan <at> gmail.com>
Cc: rgm <at> gnu.org, 15252 <at> debbugs.gnu.org
Subject: Re: bug#15252: dir-locals: superdir (or parentdir) support
Date: Sat, 14 Sep 2013 12:38:14 +0300
> From: Jambunathan K <kjambunathan <at> gmail.com>
> Date: Sat, 14 Sep 2013 14:15:16 +0530
> Cc: 15252 <at> debbugs.gnu.org
> 
> > (Copyright assigned) patches
> 
> Always vigilant!
> 
> I thought Emacs project has my future assingments on paper.  As far as
> my understanding of law goes, the annulment of contract doesn't take
> effect until it is signed off both the parties.

Your assignment appears as "canceled on 2013-4-2" in the FSF records
since last April.




Reply sent to Jambunathan K <kjambunathan <at> gmail.com>:
You have taken responsibility. (Fri, 15 Nov 2013 04:57:01 GMT) Full text and rfc822 format available.

Notification sent to Jambunathan K <kjambunathan <at> gmail.com>:
bug acknowledged by developer. (Fri, 15 Nov 2013 04:57:02 GMT) Full text and rfc822 format available.

Message #19 received at 15252-done <at> debbugs.gnu.org (full text, mbox):

From: Jambunathan K <kjambunathan <at> gmail.com>
To: 15252-done <at> debbugs.gnu.org
Subject: Re: bug#15252: dir-locals: superdir (or parentdir) support
Date: Fri, 15 Nov 2013 10:25:31 +0530
OP here.  Closed.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 13 Dec 2013 12:24:21 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 186 days ago.

Previous Next


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