[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A unified project root interface
From: |
Stefan Monnier |
Subject: |
Re: A unified project root interface |
Date: |
Sun, 10 Mar 2013 00:38:12 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> So this is my somewhat verbose request to say "yes, let's do this" and
> pick a library to provide the functionality.
Agreed. There are already different such things distributed with Emacs:
.dir-locals.el is one of them. CEDET has its own notion.
As mentioned .dir-local.el often acts as a project root, but it can also
appear in sub-directories of a project, so it's not sufficient.
It should at least be augmented so that some .dir-locals.el can be
flagged as "non-root".
If the only need is to figure out the "root directory of the project",
then maybe a simple solution is:
(defvar project-root-predicate
(lambda () (file-exists-p ".dir-locals.el")))
(defun project-root ()
(locate-dominating-file default-directory project-root-predicate))
where packages can (add-function :until-before (default-value
project-root-predicate) <mypredicate>) to recognize other "tell tale
sign" of a project root (e.g. a Tupfile).
Stefan
- A unified project root interface, Jorgen Schaefer, 2013/03/09
- Re: A unified project root interface, Fabian Ezequiel Gallina, 2013/03/09
- Re: A unified project root interface,
Stefan Monnier <=
- Re: A unified project root interface, Jorgen Schaefer, 2013/03/10
- Re: A unified project root interface, LluĂs, 2013/03/11
- Re: A unified project root interface, David Engster, 2013/03/13
- Re: A unified project root interface, Sudish Joseph, 2013/03/13
- Re: A unified project root interface, Eric M. Ludlam, 2013/03/15
- Re: A unified project root interface, David Engster, 2013/03/16
- Re: A unified project root interface, Jorgen Schaefer, 2013/03/16