emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#15252: closed (dir-locals: superdir (or parentdir)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#15252: closed (dir-locals: superdir (or parentdir) support)
Date: Fri, 15 Nov 2013 04:57:01 +0000

Your message dated Fri, 15 Nov 2013 10:25:31 +0530
with message-id <address@hidden>
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
address@hidden)


-- 
15252: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15252
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: dir-locals: superdir (or parentdir) support Date: Tue, 03 Sep 2013 09:09:15 +0530 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
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.







--- End Message ---
--- Begin Message --- Subject: Re: bug#15252: dir-locals: superdir (or parentdir) support Date: Fri, 15 Nov 2013 10:25:31 +0530 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
OP here.  Closed.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]