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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jambunathan K <kjambunathan <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#15252: closed (dir-locals: superdir (or parentdir) support)
Date: Fri, 15 Nov 2013 04:57:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 15 Nov 2013 10:25:31 +0530
with message-id <8738mymfgc.fsf <at> gmail.com>
and subject line Re: bug#15252: dir-locals: superdir (or parentdir) support
has caused the debbugs.gnu.org bug report #15252,
regarding dir-locals: superdir (or parentdir) support
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
15252: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15252
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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.






[Message part 3 (message/rfc822, inline)]
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.


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

Previous Next


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