[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A unified project root interface
From: |
Jorgen Schaefer |
Subject: |
Re: A unified project root interface |
Date: |
Wed, 20 Mar 2013 18:49:26 +0100 |
On Wed, 20 Mar 2013 17:34:09 +0100
David Engster <address@hidden> wrote:
> Instead, I'd vote for a very simple approach which at least takes EDE
> projects into account, among other things. Roughly like this:
>
> (defun project-root-ede (file)
> (when (and (featurep' ede)
> (with-current-buffer file
> ede-object-root-project))
> ... return EDE root ... ))
>
> (defun project-root-vc (file)
> (when (vc-file-registered file)
> ... return root from VC ... ))
>
> (defvar project-root-detect-functions
> '(project-root-ede project-root-vc))
>
> (defun project-root ()
> (run-hook-with-args-until-success
> project-root-detect-functions
> (buffer-file-name (current-buffer))))
This sounds like an excellent idea. If you guarantee the hook to be run
in the file's buffer, you do not even need the argument.
Happy to write the code etc. if this is deemed the way to go :-)
Regards,
-- Jorgen
- EIEIO split (was: A unified project root interface), (continued)
- EIEIO split (was: A unified project root interface), David Engster, 2013/03/23
- Re: A unified project root interface, David Engster, 2013/03/21
- Re: A unified project root interface, Eric M. Ludlam, 2013/03/21
- Re: A unified project root interface, David Engster, 2013/03/22
- Re: A unified project root interface, Eric M. Ludlam, 2013/03/23
- Re: A unified project root interface, Jorgen Schaefer, 2013/03/23
- Re: A unified project root interface, Dmitry Gutov, 2013/03/23
- Re: A unified project root interface, Pascal J. Bourguignon, 2013/03/23
- Re: A unified project root interface, Dmitry Gutov, 2013/03/24
- Re: A unified project root interface, Jorgen Schaefer, 2013/03/24
- Re: A unified project root interface,
Jorgen Schaefer <=
- Re: A unified project root interface, Jorgen Schaefer, 2013/03/19
- Re: A unified project root interface, joakim, 2013/03/17
- Re: A unified project root interface, Phil Hagelberg, 2013/03/16
Re: A unified project root interface, Sudish Joseph, 2013/03/12
Re: A unified project root interface, Ted Zlatanov, 2013/03/12