On 30 Dec 2013, at 16:59, [email protected] wrote:
> Georg Bauhaus <[email protected]> writes:
>
>> On 29 Dec 2013, at 22:47, [email protected] wrote:
>>> I don't have a good use case for
>>> editing without a project file; anyone else?
>> It may not be immediately obvious to a mode user what "project file”
>> means: .gpr, .apr, .prj, Makefile?
>
> Yes; these do all have more specific names:
>
> .apr -> ?
> perhaps you meant .adp, which is one of the default extensions for
> an Emacs Ada mode project file
Yes. (I was confused and the source of the confusion is obvious.
Part of the reason was the other IDEs use .prj for completely different
things, so overload resolution has affected different braches.)
May I suggest that the notions will be pedantically named using
unambiguous descriptions? Or their co-operation clarified?
To have .gpr working as “project” within Emacs Ada mode is very nice,
but it can be confusing to see the same word used to denote different
things. In particular, the user will have to sort out the explicit
distinction in the second sentence of this paragraph from
@chapter Overview:
"Finally, for large Ada projects, you will want to set up an Emacs
Ada mode project file for each project; @xref{Project files}. Note
that these are different from the GNAT project files used by gnatmake
and other GNAT commands."
>> As a list of use cases,
>> - if using another compiler besides GNAT,
>
> Definitely requires either a project file or ~/.emacs customization of
> Emacs Ada mode defaults (or file variable customization, as you point
> out below).
A project would be needed, I’d think, if the programmer uses Emacs
as the IDE. Likely the most frequent and most important use case;
I have edited source text in emacsclient in the past when the
IDE of some other compiler lacked this or that editing tool.
Possibly water under the bridge.
>> - if editing a multiple-unit source text in one file; e.g. test cases,
>> trying Ada features in a "temporary" unit,
>
> If doing this with GNAT, you need a way to invoke gnatchop first; a
> Makefile would be my choice.
Yes, convenient if a Makefile has been written and placed where it is
usually used or found; sometimes a Makefile is more work than using
Emacs’s command history and just editing a command, such as adding
ad-hoc switches. In the Minibuffer:
Compile command: gnatchop … units.ada && gnatmake … unit.ads
(I think of this as flexible work done alongside a project
using just basic tools (Emacs, OS, and compiler) and no configuration.)
>
>> then I think that doing nothing mode specific (like handling project
>> setup) should still allow editing Ada source text without restrictions
>> (see below for a potential solution).
>
> "editing without restrictions" is not clear to me.
Another case you mentioned in addition to the one the OP’s has reported
is the effect of C-c C-o when no project has been selected: e.g. open an
Ada library unit spec in the compiler’s directories, then try finding
the body via C-c C-o in the same directory. Doesn’t work, the message is:
ada-find-other-file: no file search path defined; set project file?
It works after some project is selected. So, that teaches me
to do the right thing and do write/select a project.
>
Points taken.
> Although it might make sense to provide a function that writes out the
> current project settings to a file that the user specifies. That would
> ease the transition from file variables to project file.
>
> But, is this a real use case? How many people actually do real editing
> without any project file?
As a general observation of IDE use: It is a (certifiable) qualification
to know how to set up a project with some IDE; with Eclipse, say, it
might be insufficient qualification to know language and target
platform well, but not know the set of project descriptions that some
party currently finds important. However, Eclipse features project
creation dialogs that get the programmer going. Hence the idea to
enable Ada mode to write a project file that gets the programmer
going. (Another opportunity for skeleton?)
All of this may not be an issue for pro workers. So, please ignore
as needed. I just imagined that newcomers and students might be
puzzled.
_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org