emacs-devel
[Top][All Lists]
Advanced

[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, 17 Mar 2013 19:18:17 +0100

On Sun, 17 Mar 2013 18:40:13 +0100
David Engster <address@hidden> wrote:

> > The problem I raised in this thread is that too many packages write
> > their own solution because using any of the possible standard
> > solutions is too cumbersome. Saying "there is a cumbersome standard
> > solution" does not solve the problem.
> 
> I do not say that.

Great. I'm glad I misunderstood, and thank you for correcting me.

> To hopefully prove my point, I've hacked together a small EDE project
> for detecting files under git/hg/bzr version control, very similar to
> how you do it in your project.el (I've dropped the CVS/.svn detection
> for the moment).

> [...]

> and load some file under a git/hg/bzr versioned directory. There is an
> example function `my-get-project-root' to print the project's root.

Opening a file in a subdirectory of a repository root does not
associate it with a project. I suspect this is a bug in this "proof of
concept" implementation more so than a conceptual problem, though :-)

Thank you for providing an example implementation.

> Just to be clear: I do *not* expect that users write this stuff;
> instead, Emacs should provide projects like this as defaults.

If I understand this right, this looks good.

I'm a bit unsure about requiring EDE, CEDET, etc. for this - it's not
unlikely that people will go "meh" and not use it because of that. (I'm
sorry to say so, but the complexity of CEDET is a recurring theme on the
Emacs IRC channel.)

So in the end, what we need for trivial implementation:

- Provide a default "simple project" that auto-detects the root via
  VCS markers

- Define a (project-root) that simply returns (and
  ede-object-root-project (ede-project-root-directory
  ede-object-root-project))

- Define a (project-set-root DIR) that does (oset this :file DIR) for
  the current project. If there is no current project, this should
  create a "simple project" for that directory so other uses of
  (project-root) will find it.

- Ask authors of extensions to use (ede-minor-mode 1) in their mode
  function and simply use that function in their modes.

Does this sound sensible?

Regards,
        -- Jorgen



reply via email to

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