[Emacs-ada-mode] updated ada-mode with manual

Stephen Leake stephen_leake at stephe-leake.org
Tue Aug 29 16:39:41 PDT 2006


"The masked-coder known as Randux" <randux at Safe-mail.net> writes:

>> That is certainly possible. I don't think the Emacs ada-mode manual
>> needs to talk about it.
>
> I don't understand where this is going...gvd is a GUI (running on
> top of gdb) specifically designed for source level debugging GNAT
> Ada. Since I saw that ddd was mentioned in the doc and gvd was not
> mentioned, I suggested we include some information on gvd 

I don't think Emacs ada-mode needs to talk about ddd or other GUI
debugger interfaces, either. I just haven't gotten to deleting them
yet. 

> as it's certainly more preferable/usable than ddd when the topic is
> GUI debuggers for Ada. GPS is not better than gvd- GPS is the IDE,
> gvd is just the GUI for gdb...two completely different animals. 

GPS includes the GUI from gvd; gvd was the first version of GPS. 

>> I gather you mean typing C-c C-c in hello_a compiles A, then in
>> hello_b compiles B, then in hellow_a compiles b again.
>> 
>> That's not a bug, that's a feature. It is useful in the much more
>> common case of multiple file projects.
>> 
>> I proposed one change related to this:
>> 
>>     I'd also like to add a menu command "set main" to just set the
>>     main file.
>> 
>> Would that fix the problem?
>
> I thought we agreed earlier that it was "unexpected behavior" and
> you were planning to fix it. 

Yes, I did say that. But I always reserve the right to change my mind
:). In this case, I thought one reasonable fix was user education via
a better ada-mode manual.

> I don't think adding a requirement for the user to do something
> extra is a fix for this- it's not very intuitive that when I'm
> looking at a buffer and press C-c C-c that it should just build
> anything other than what I'm looking at. 

Well, if you are used to building projects that have more than one
file, it's _very_ intuitive! It would be completely wrong to invoke
gnatmake on the file I happen to have edited last, rather than on the
main file.

> If this isn't a usability flaw of the highest order, then I can't
> think of a better example!

Again, I see it as a case of incorrect user expectations, which
requires education.

>> If not, what, specifically, would you like to change in the Emacs
>> ada-mode menu? And how would it impact compiling multiple-file projects?
>
> As I've mentioned, not only am I not qualified to speak on the topic
> of multi-file Ada projects, 

Ok, you'll have to leave that to the rest of us. But you are asking me
to break ada-mode for multi-file projects; that isn't going to happen.

> but I think the least amount of automation the better it will be for
> the user and for the maintainer.

Automating the compile/edit cycle is always a good thing, as long as
people understand what it's doing.

> There should be one key and one menu item to build *this* item I'm
> looking at. I'm in a buffer, I want to do a gnatmake on *this*
> buffer.

Ok. That will be the "set main and build" command I proposed recently.

But there also needs to be one key/menu item to build the current
main. I don't really care which key is which, but currently C-c C-c is
"build current main".

So "set main and build" will be some other key. I guess I need to make
a list of all the ada-mode keys currently defined, so we can pick a
new one.

>> > Also uncomment seems broken (but was also broken in the ada-mode
>> > supplied in Emacs 21.4). 
>> 
>> Yes, it does not delete the correct number of spaces.
>
> For me it's totally broken.  It does nothing at all except produce this error message:
>
> Wrong type argument: number-or-marker-p, (-1)

That's some installation problem, or a bug in your .emacs.

Can you start with emacs -q, then open an Ada buffer, and try it? that
will be with the Emacs distribution version of ada-mode. If that
works, try commenting out stuff in your .emacs to see if you can
isolate it.

-- 
-- Stephe



More information about the Emacs-ada-mode mailing list