all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
To: emacs-devel@gnu.org
Subject: Re: running EDE from a file that is not under a project root dir
Date: Wed, 05 Aug 2015 02:48:00 -0500	[thread overview]
Message-ID: <86wpxab2hb.fsf@stephe-leake.org> (raw)
In-Reply-To: <55C14848.8030904@yandex.ru> (Dmitry Gutov's message of "Wed, 5 Aug 2015 02:18:32 +0300")

Dmitry Gutov <dgutov@yandex.ru> writes:

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

Right; I'm exploring using an EDE elisp project via the project.el API.

I'm also implementing a separate elisp project that supports only the
project.el API.

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

Yes, I think that would be appropriate.

> And ede-source-file-patterns 

That's not a currently defined function. Did you mean
project-source-file-patterns? Or are you agreeing with me that EDE needs
to add this?

> could be used by semantic-symref-symbol and semantic-symref-regexp.
>
> That issue aside, xref-find-references currently doesn't use
> project-ignores, 

Right; it should.

> nor does it use grep-find-ignored-directories and
> grep-find-ignored-files. 

It should not use these directly; only via project-ignores.

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

I don't understand. Surely the concept "a project that is active in all
buffers" is independent of the actual project type?

I will want it for elisp, Ada, Java, ...

If it's not in project.el, I'll have to add it to every new project type
I write; that will be a name conflict, at the very least.

-- 
-- Stephe



  reply	other threads:[~2015-08-05  7:48 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
2015-08-05  7:48   ` Stephen Leake [this message]
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

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

  git send-email \
    --in-reply-to=86wpxab2hb.fsf@stephe-leake.org \
    --to=stephen_leake@stephe-leake.org \
    --cc=emacs-devel@gnu.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.