emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: running EDE from a file that is not under a project root dir


From: Eric Ludlam
Subject: Re: running EDE from a file that is not under a project root dir
Date: Tue, 04 Aug 2015 21:57:07 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0



On 08/04/2015 02:13 PM, Stephen Leake wrote:
I often have "notes" files that are outside a project directory. For
example, my Emacs notes are not in the emacs/master directory; it is
controlled by git, and I don't want to commit my notes to that, nor
clutter .gitignore.

At the same time, I'd like to be able to invoke "search for symbol at
point" from the notes text buffer; I have notes on functions/vars I'm
using at the moment.

...

My question is this; what is the minimum change I should make to EDE to
support these use cases?

I think I need three things:

- add a "file patterns" element to the EDE project (or target?) data
structure, and have semantic-symref-derive-find-filepatterns check that
before the alists.

I'm not sure what matching file patterns has to do with core project functionality. Your use case sounds like something that would want a specialized tool, the same way there are tools that jump between 'doc' and 'code'.

For example, if you keep notes in org mode (I assume everyone here uses org mode these days) then perhaps what is needed is tooling that knows how to keep TODO files in an org file tied to a project and the desired language, and then the project would form the root of any symref call.

I suspect symref needs a tweak so that the major mode in question is passed along far enough to get into the pattern matcher. Once that is done, a tool that goes from your notes to src could call symref however it is needed.

- add an ede-global-project variable that I can set to my current
project, to bypass the project root detection.

     I've proposed the same change to project.el; there, it can be used
     by one of the project-find functions.

I find the global project concept scary. I can't say how many times I've edited Emacs code that was wasn't on my load path because I had multiple checkouts of the same code. Mostly just too many times.

- some way to set up the EDE project object for elisp, especially the
file patterns.

I don't think you need to do anything project specific here. Symref doesn't do anything with EDE past getting the root.

     The EDE info manual in Emacs master mentions ede-proj-elisp.el in
     section 8 Extending EDE, but I don't see that file in Emacs master
     git.

That is a piece of the large Make/Automake project system that builds makefiles for you. Symref only uses EDE to identify a starting place for the search, or a place to find tooling caches (like GTAGS). EDE is then used by the semantic part that builds up the output buffer by parsing tags which needs various include paths depending on language.

Eric



reply via email to

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