* bug#15252: dir-locals: superdir (or parentdir) support
@ 2013-09-03 3:39 Jambunathan K
2013-09-03 6:39 ` Glenn Morris
2013-11-15 4:55 ` Jambunathan K
0 siblings, 2 replies; 5+ messages in thread
From: Jambunathan K @ 2013-09-03 3:39 UTC (permalink / raw)
To: 15252
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-11-15 4:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-03 3:39 bug#15252: dir-locals: superdir (or parentdir) support Jambunathan K
2013-09-03 6:39 ` Glenn Morris
2013-09-14 8:45 ` Jambunathan K
2013-09-14 9:38 ` Eli Zaretskii
2013-11-15 4:55 ` Jambunathan K
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).