[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A unified project root interface
From: |
David Engster |
Subject: |
Re: A unified project root interface |
Date: |
Mon, 18 Mar 2013 23:50:23 +0100 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.93 (gnu/linux) |
Jorgen Schaefer writes:
> On Sun, 17 Mar 2013 18:40:13 +0100
> David Engster <address@hidden> wrote:
>> 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 :-)
I've attached a new version which should hopefully work better.
> 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.)
I'd like to stress again that querying EDE for stuff like the current
root project directory does not require knowledge of EIEIO/CLOS; if you
find that it does, then please report this and we fix it.
Yes, functions like `ede-project-root-directory' are actually methods,
but why does it matter? Just call them like any other function. What
*is* a real problem at the moment is that `describe-function' does not
say anything meaningful about them, but I'm in the process of fixing
that. If it's still seen as too cumbersome after that, then OK, let's
wrap'em. :-)
I'm willing to code the necessary stuff on the EDE side of things; if it
turns out too complicated to use for package maintainers, I have no
problem throwing it away.
> 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))
That's for the maintainers to decide. I have a hunch they'd like to have
an ede- prefix...
> - 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.
This can be done. I will need a bit of time though, since I really need
to do another CEDET merge round with current trunk first. I think I'll
be able to come up with something in the coming weeks.
> - Ask authors of extensions to use (ede-minor-mode 1) in their mode
> function and simply use that function in their modes.
Not sure if it's a good idea to enable EDE behind the user's back; I
think they should enable it in their init file if they want to have
project support. But IMO that's a detail; let's cross that bridge when
we get there.
-David
vcs-root.el
Description: application/emacs-lisp
- Re: A unified project root interface, (continued)
- Re: A unified project root interface, Eric M. Ludlam, 2013/03/12
- 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
- Re: A unified project root interface, David Engster, 2013/03/16
- Re: A unified project root interface, Jorgen Schaefer, 2013/03/16
- Re: A unified project root interface, David Engster, 2013/03/17
- Re: A unified project root interface, Jorgen Schaefer, 2013/03/17
- Re: A unified project root interface,
David Engster <=
- Re: A unified project root interface, John Yates, 2013/03/18
- Re: A unified project root interface, David Engster, 2013/03/19
- Re: A unified project root interface, Eric M. Ludlam, 2013/03/19
- Re: A unified project root interface, Stefan Monnier, 2013/03/19
- Re: A unified project root interface, David Engster, 2013/03/19
- Re: A unified project root interface, Stefan Monnier, 2013/03/19
- Re: A unified project root interface, Leo Liu, 2013/03/20
- Re: A unified project root interface, joakim, 2013/03/20
- Re: A unified project root interface, David Engster, 2013/03/20
- Re: A unified project root interface, David Engster, 2013/03/20