[Top][All Lists]

[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: Sun, 24 Mar 2013 11:13:10 +0100

On Sun, 24 Mar 2013 08:25:38 +0400
Dmitry Gutov <address@hidden> wrote:

> The idea is that `project-root' calls all functions in
> `project-root-functions', and as soon as one of them returns a
> meaningful value, `project-root' (being the caller) uses it to set the
> value of `current-project-dir', and then probably caches it.

I did a quick implementation of my current ideas on the topic:


Quick run-down:

- If you only want to know the project root, you call (project-root)
  and never have to worry about anything else.
- This will call functions in `project-guess-root-functions' until one
  returns a non-nil value. This value is cached for future calls.
- The default functions use the current EDE project if any, or VC
  directory markers, or ask the user; can be extended as needed.
- When an extension provides a way to change the project root, they
  can call `project-set-root', which will run
  `project-root-changed-hook' so that other extensions (e.g. EDE) can
  intercept that and adjust themselves accordingly. Or even throw an

Other extensions should be able to build on that.

        -- Jorgen

reply via email to

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