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: Stephen Leake
Subject: Re: running EDE from a file that is not under a project root dir
Date: Thu, 06 Aug 2015 09:39:22 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt)

Dmitry Gutov <address@hidden> writes:

> On 08/06/2015 11:01 AM, Stephen Leake wrote:
>
>>> As long as we're reusing semantic-symref-find-references-by-name, we
>>> need some way to make it use the ignores. Probably not by making it
>>> aware of project.el.
>>
>> Why not? that seems to fit perfectly with "provide project information
>> to other elisp programs"
>
> Sure, if you want to rewrite it. Should probably get Eric's agreement first.
>
>> There's a very good reason; there should be _one_ global variable that
>> stores the _one_ currently active project.
>
> You seem to be arguing from some ideological standpoint. There's no
> practical need for this, for you to get the desired behavior, AFAICT.
>
>> You are completely missing the point of this functionality.
>
> How so? As long as your project-find-functions element knows which
> variable to look up, you should be all set.

How would it know that?

Suppose I have a gpr project backend for AdaCore gprbuild projects, and
a gradle backend for Android gradle projects.

There are corresponding global variables; gpr-global-project,
gradle-global-project, each with a project-find function.

I set project-find-functions to '(gpr-find-project gradle-find-project).

I first open a gpr project, which sets gpr-global-project, then later
open a gradle project, which sets gradle-global-project.

Next time (project-current) is  called, it returns gpr-global-project,
which is wrong.

I'm proposing to fix this by having one global variable with one
find-function.

You seem to have some other solution in mind; what would it be?

Hmm. Perhaps the "select project" function could change
project-find-functions as well, using delq and add-to-list. But that
messes with the order of the list, which the user may have carefully
set. For example, I currently have it set to '(project-try-ede
project-find-prj-root project-explicit-prj).

-- 
-- Stephe



reply via email to

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