emacs-devel
[Top][All Lists]
Advanced

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

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


From: Stephen Leake
Subject: running EDE from a file that is not under a project root dir
Date: Tue, 04 Aug 2015 13:13:56 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt)

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.

Currently, I'm trying to use xref-find-references on the elisp function
temp-buffer-window-show (defined in window.el).

That delegates to semantic-symref-find-references-by-name, which is
where EDE comes in.

This uses semantic-symref-detect-symref-tool to get the search tool; it
picks grep (meaning grep-find), which is fine.

But then it uses semantic-symref-derive-find-filepatterns to get the
file patterns to pass to grep. Since I'm starting from a text-mode
buffer, that returns (*.letter *.article *.te?xt). Which is _not_ what I
want; I want *.el.

Creating an EDE project would not help, because
semantic-symref-derive-find-filepatterns doesn't use the EDE project,
only semantic-symref-filepattern-alist and auto-mode-alist.


A related use case is searching for C identifiers from a LaTeX
documentation file in a C project; then EDE will find the right root and
project, but still return the wrong file patterns.


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.

- 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.

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

    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.
    
-- 
-- Stephe



reply via email to

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