emacs-devel
[Top][All Lists]
Advanced

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

Re: Project support and completions


From: Stephen Leake
Subject: Re: Project support and completions
Date: Mon, 26 Jan 2015 12:51:34 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt)

Eli Zaretskii <address@hidden> writes:

>> From: Stefan Monnier <address@hidden>
>> Cc: Eli Zaretskii <address@hidden>, address@hidden
>> Date: Mon, 26 Jan 2015 10:07:48 -0500
>> 
>> >> Which decision?
>> > Whether to make the second project active as soon as I visit a file in
>> > it.  Assuming you use Eli's meaning of "active" (used for completion and
>> > navigation in all (?) buffers).
>> 
>> No, a project would be only ever active in the buffers related to it
>
> In some use cases, this would be an annoying limitation.  So we need a
> fire escape for those.
>
>> (plus in the buffers related to no project at all, but in that case the
>> user has to choose which project to use, unless there's only one).
>
> For each such buffer?  If so, that's again an annoyance.
>
> I don't really understand the rationale behind this design.  How
> frequently (in time units) do you switch from one project to another?
> Unless you do that several times a minute, I cannot see why would we
> want this automation.
>
> Me, I change project maybe once or twice a day, sometimes once a
> week.  With such a low frequency, I don't need the automation too
> much, but I do need the freedom to do project-related stuff from any
> buffer I happen to be in.  Maybe I'm the odd one out.

In ada-mode, I use the compiler defined project definition files to
define Emacs projects.

One file can belong to several projects, due to project nesting. For
example:

common
    base
        file_1.ads

MAP
    models
        file_2.ads

MMS
    models
        file_3.ads

file_2.ads and file_3.ada both depend on file_1.ads, but MAP and MMS are
different (high-level) projects

The file common/base/file_1.ads belongs to the "common", "MAP", and "MMS"
projects.

I have no automation to select the project; the user must always choose;
I usually put a file local expression in the Makefile for each project
to set that project initially. But after I have several Makefiles open,
I switch between projects manually. And I like it that way.

The list of projects that Emacs knows about (ie, whose project
definition files have been parsed) is available on an ada-mode menu, so
it's easy to switch between projects.

ada-mode projects are actually multi-language; they include C and C++,
and anything else the user has told the compiler project file about.


On the other hand, I do edit elisp code (to fix ada-mode, for example)
while I am editing Ada code. So it might be nice to have Emacs switch
between "the current elisp project" and "the current real project"
automatically. Maybe based on major mode? ie "the current real project"
includes all buffers with ada, C, or C++ mode. In my case, those
languages are listed in the compiler project file, so that is at least
possible to implement without further user work. But I suspect this is a
_very_ special case :).


If there is project choosing automation, it must be possible to turn it
off or override it in some way.


I have not been following this thread closely; is there a proposed API
somewhere?

-- 
-- Stephe



reply via email to

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