GNU bug report logs -
#15252
dir-locals: superdir (or parentdir) support
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#15252: dir-locals: superdir (or parentdir) support
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 15252 <at> debbugs.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)]
OP here. Closed.
[Message part 3 (message/rfc822, inline)]
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.
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.