unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Stephen Leake <stephen_leake@stephe-leake.org>, emacs-devel@gnu.org
Subject: Re: running EDE from a file that is not under a project root dir
Date: Wed, 5 Aug 2015 02:18:32 +0300	[thread overview]
Message-ID: <55C14848.8030904@yandex.ru> (raw)
In-Reply-To: <861tfiexaz.fsf@stephe-leake.org>

On 08/04/2015 09:13 PM, Stephen Leake wrote:

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

If we don't want to change too much code, I suppose 
xref-collect-references could bind semantic-symref-filepattern-alist to 
a list of one element:

`((,major-mode "*"))

Though that will search in all files. To refine it further, indeed we 
could make the choice based on what the project tells us.

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

That's cool, but won't help xref-find-references if EDE isn't used. A 
hard dependency on EDE could even break the current usage of 
semantic-symref-find-references-by-name in xref-find-references.

On the other hand, if we introduce project-source-file-patterns, 
xref-find-references could use it in the 
semantic-symref-filepattern-alist binding.

And ede-source-file-patterns could be used by semantic-symref-symbol and 
semantic-symref-regexp.

That issue aside, xref-find-references currently doesn't use 
project-ignores, nor does it use grep-find-ignored-directories and 
grep-find-ignored-files. Thought it still works reasonably quickly as 
long as the "uninteresting" files don't match the file name pattern we 
search for.

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

project.el doesn't need that variable. The variable can just as well 
live in the package you're writing.



  reply	other threads:[~2015-08-04 23:18 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-04 18:13 running EDE from a file that is not under a project root dir Stephen Leake
2015-08-04 23:18 ` Dmitry Gutov [this message]
2015-08-05  7:48   ` Stephen Leake
2015-08-05  9:30     ` Dmitry Gutov
2015-08-06  8:01       ` Stephen Leake
2015-08-06 10:34         ` Dmitry Gutov
2015-08-06 14:39           ` Stephen Leake
2015-08-06 21:45             ` Dmitry Gutov
2015-08-07 14:15               ` Stephen Leake
2015-08-05  1:57 ` Eric Ludlam
2015-08-05  6:43   ` Stephen Leake
2015-08-05  7:20     ` Stephen Leake
2015-08-05 15:09       ` Eli Zaretskii
2015-08-05 11:42     ` Eric Ludlam
2015-08-06  8:37       ` Stephen Leake
2015-08-06 10:55         ` David Engster
2015-08-06 14:55           ` Stephen Leake
2015-08-07 10:48             ` David Engster
2015-08-07 14:28               ` Stephen Leake
2015-08-07 14:53                 ` David Engster
2015-08-10 10:09             ` Steinar Bang
2015-08-06 11:44         ` Eric Ludlam
2015-08-06 15:03           ` Stephen Leake
2015-08-05 11:51     ` Eric Ludlam
2015-08-06  8:58       ` Stephen Leake
2015-08-08 15:26         ` Stephen Leake
2015-08-08 21:07           ` Eric Ludlam
2015-08-05  9:54   ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55C14848.8030904@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=stephen_leake@stephe-leake.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).