comp.lang.ada
 help / color / mirror / Atom feed
* Emacs and Ada.
@ 2001-10-25 22:58 Wannabe h4x0r
  2001-10-26 13:00 ` Marc A. Criley
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Wannabe h4x0r @ 2001-10-25 22:58 UTC (permalink / raw)


Lately I've found the combination of Emacs(XEmacs), Ada-Mode, and the LRM
to be awsome tools in my endeavor to learn Ada95.
The thing I like is being able to have open a compiler buffer/error
message window, a source window/buffer, and a LRM buffer. It allows me to
reference the LRM for each error message I get when attempting to
compile, and hence allows me to go back and edit the source code
according the rules set out in the LRM.
I havent had to open a debugger in several weeks.

I'm curious, will Ada-Mode work with Emacs21?
Also, does Ada-Mode provide a facility for automatically cross-referencing
compiler messages with the relavant language documentation?
I didnt find any mention of this in the Ada-Mode docs(perhaps I'm
missing it.) If not, would other programmers find this feature useful?
I could implement that feature and then submit it for perusal should 
anyone be interested. If someone else doesnt beat me to the punch. ;->

Any comments would be helpful.

Note: I spend alot more time with my Ada textbook than I do with the 
LRM. I find the LRM to be a useful reference tool.

McDoobie
chris@dont.spam.me



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Emacs and Ada.
  2001-10-25 22:58 Emacs and Ada Wannabe h4x0r
@ 2001-10-26 13:00 ` Marc A. Criley
  2001-10-26 13:32 ` Stephen Leake
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Marc A. Criley @ 2001-10-26 13:00 UTC (permalink / raw)


Wannabe h4x0r wrote:
> 
> Also, does Ada-Mode provide a facility for automatically cross-referencing
> compiler messages with the relavant language documentation?
> I didnt find any mention of this in the Ada-Mode docs(perhaps I'm
> missing it.) If not, would other programmers find this feature useful?
> I could implement that feature and then submit it for perusal should
> anyone be interested. If someone else doesnt beat me to the punch. ;->
> 

You're not missing anything (so far as I know).  And if you want to add
such a doc cross-referencing feature, go for it!  While many of us find
Emacs an invaluable development aid, we find programming it a bit
esoteric :-)  So I doubt you need worry about anyone beating you to it.

Marc A. Criley
Senior Staff Engineer
Quadrus Corporation
www.quadruscorp.com



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Emacs and Ada.
  2001-10-25 22:58 Emacs and Ada Wannabe h4x0r
  2001-10-26 13:00 ` Marc A. Criley
@ 2001-10-26 13:32 ` Stephen Leake
  2001-10-26 13:33 ` Ted Dennison
  2001-10-26 13:42 ` Wes Groleau
  3 siblings, 0 replies; 9+ messages in thread
From: Stephen Leake @ 2001-10-26 13:32 UTC (permalink / raw)


"Wannabe h4x0r" <chris@dont.spam.me> writes:

> Lately I've found the combination of Emacs(XEmacs), Ada-Mode, and the LRM
> to be awsome tools in my endeavor to learn Ada95.
> The thing I like is being able to have open a compiler buffer/error
> message window, a source window/buffer, and a LRM buffer. It allows me to
> reference the LRM for each error message I get when attempting to
> compile, and hence allows me to go back and edit the source code
> according the rules set out in the LRM.
> I havent had to open a debugger in several weeks.

Welcome to the wonderful world of Ada and Emacs - the most powerful
programming paradigm on the planet :).

> I'm curious, will Ada-Mode work with Emacs21? 

Probably. I'll get around to trying it eventually, but I think I'll
wait for 21.3 or so. The 20 to 21 transition is a _big_ one. ada-mode
is supported by ACT, so they'll get around to fixing any bugs
eventually also. Come to think of it, I think Emmanueal Briot (the ACT
ada-mode maintainer) is using an early release of Emacs 21.

> Also, does Ada-Mode provide a facility for automatically
> cross-referencing compiler messages with the relavant language
> documentation? I didnt find any mention of this in the Ada-Mode
> docs(perhaps I'm missing it.) 

No, it does not. Such a cross reference would depend on coded
information in the compiler message.

ACT made a deliberate decision _not_ to put LRM references in the
compiler error messages. They believe (and they would be in a position
to know, since they sell support!) that such references do more harm
than good, since the LRM is _not_ a beginners book. They feel a good
error message is enough. Another point is that it is not at all clear
in many error situations which LRM reference to give!

The Intermetrics front end does include them. It would probably not be
hard to get Emacs to recognize them, and pop up the corresponding node
in the info file.

> If not, would other programmers find this feature useful? I could
> implement that feature and then submit it for perusal should anyone
> be interested. If someone else doesnt beat me to the punch. ;->

There have been a couple of threads on this newsgroup about this issue
in the last year or so; check the archives.

> Any comments would be helpful.

I think I would prefer the option of hitting a key to pop up the LRM
reference, if one is given. But it is a very rare situation that I
_need_ to read the LRM to resolve an error message; it would mostly be
for curiosity.

> Note: I spend alot more time with my Ada textbook than I do with the
> LRM. I find the LRM to be a useful reference tool.

Exactly. It would be much more useful to the Ada beginner to have a
key that went from the error message to the appropriate chapter in the
book. That, of course, is a _much_ more difficult function to
implement :). Although, there is now a textbook available online; you
_could_ add references to that in the GNAT sources :).

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Emacs and Ada.
  2001-10-25 22:58 Emacs and Ada Wannabe h4x0r
  2001-10-26 13:00 ` Marc A. Criley
  2001-10-26 13:32 ` Stephen Leake
@ 2001-10-26 13:33 ` Ted Dennison
  2001-10-26 16:50   ` Pascal Obry
  2001-10-26 13:42 ` Wes Groleau
  3 siblings, 1 reply; 9+ messages in thread
From: Ted Dennison @ 2001-10-26 13:33 UTC (permalink / raw)


In article <kO0C7.200373$K6.97311991@news2>, Wannabe h4x0r says...
>I'm curious, will Ada-Mode work with Emacs21?

Eventually of course it will. Initially, someone will have to try it. I haven't
heard any complaints to that effect yet, but 21 just came out this week. NT
binaries aren't even available yet at the standard download places.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html

No trees were killed in the sending of this message. 
However a large number of electrons were terribly inconvenienced.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Emacs and Ada.
  2001-10-25 22:58 Emacs and Ada Wannabe h4x0r
                   ` (2 preceding siblings ...)
  2001-10-26 13:33 ` Ted Dennison
@ 2001-10-26 13:42 ` Wes Groleau
  2001-10-26 14:56   ` Ted Dennison
  3 siblings, 1 reply; 9+ messages in thread
From: Wes Groleau @ 2001-10-26 13:42 UTC (permalink / raw)




Wannabe h4x0r wrote:
> Also, does Ada-Mode provide a facility for automatically cross-referencing
> compiler messages with the relavant language documentation?

Such a feature would be compiler-specific, to the format
of the particular vendor's diagnostics.  If my ancient
Ada-83 experience is still valid, for some compilers,
the reference in the error message is completely useless.

And the best diagnostics come from GNAT, which does not
put in RM references usually (because they mean nothing
to newbies).  Instead, they actually explain the problem.

Some vendors code diagnostic messages that are perfectly
clear only to the compiler coders.

-- 
Wes Groleau
http://freepages.rootsweb.com/~wgroleau



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Emacs and Ada.
  2001-10-26 13:42 ` Wes Groleau
@ 2001-10-26 14:56   ` Ted Dennison
  2001-10-28  1:39     ` Robert Dewar
  0 siblings, 1 reply; 9+ messages in thread
From: Ted Dennison @ 2001-10-26 14:56 UTC (permalink / raw)


In article <3BD96830.1FFA30AF@sparc01.ftw.rsc.raytheon.com>, Wes Groleau says...
>And the best diagnostics come from GNAT, which does not
>put in RM references usually (because they mean nothing
>to newbies).  Instead, they actually explain the problem.

Often times a LRM reference wouldn't be particularly helpful to anyone. For
example, if I misspell an identifier, I'd much rather have a message that says
that the identifier isn't declared, and perhaps its a misspelling of this one
over here that is declare, than a pointer to the section in the LRM that says I
have to define things before I use them.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html

No trees were killed in the sending of this message. 
However a large number of electrons were terribly inconvenienced.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Emacs and Ada.
  2001-10-26 13:33 ` Ted Dennison
@ 2001-10-26 16:50   ` Pascal Obry
  2001-10-26 17:15     ` Ted Dennison
  0 siblings, 1 reply; 9+ messages in thread
From: Pascal Obry @ 2001-10-26 16:50 UTC (permalink / raw)



Ted Dennison<dennison@telepath.com> writes:

> Eventually of course it will. Initially, someone will have to try it. I
> haven't heard any complaints to that effect yet, but 21 just came out this
> week. NT binaries aren't even available yet at the standard download places.

Note that it is trivial to build Emacs from source on Windows. Now you can
even build using GCC (requires GCC 2.95.2 or later).

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Emacs and Ada.
  2001-10-26 16:50   ` Pascal Obry
@ 2001-10-26 17:15     ` Ted Dennison
  0 siblings, 0 replies; 9+ messages in thread
From: Ted Dennison @ 2001-10-26 17:15 UTC (permalink / raw)


In article <u8zdy1h24.fsf@wanadoo.fr>, Pascal Obry says...
>Ted Dennison<dennison@telepath.com> writes:
>
>> Eventually of course it will. Initially, someone will have to try it. I
>> haven't heard any complaints to that effect yet, but 21 just came out this
>> week. NT binaries aren't even available yet at the standard download places.
>
>Note that it is trivial to build Emacs from source on Windows. Now you can
>even build using GCC (requires GCC 2.95.2 or later).

Every time I've done that in the past (on other platforms), I ended up with an
immensly slow version of emacs. I'm not afraid to do it if I have to, but it'll
come out eventually and there's no real rush.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html

No trees were killed in the sending of this message. 
However a large number of electrons were terribly inconvenienced.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Emacs and Ada.
  2001-10-26 14:56   ` Ted Dennison
@ 2001-10-28  1:39     ` Robert Dewar
  0 siblings, 0 replies; 9+ messages in thread
From: Robert Dewar @ 2001-10-28  1:39 UTC (permalink / raw)


Ted Dennison<dennison@telepath.com> wrote in message news:<xQeC7.1496$xS6.2133@www.newsranger.com>...

> Often times a LRM reference wouldn't be particularly 
> helpful to anyone.

Note that GNAT *does* include RM references in those (relatively
unusual) cases where we think it is helpful to do so.

I have often found that at an abstract level people think
it is a good idea to give RM references, but in the past threads I
have always issued the suggestion that people
show an example of a GNAT error message where the RM reference would
be helpful, and so far the number of
examples received = ZERO. 

If you *do* find such a case, by all means let us know, and we will
have a look. We have no objection in principle to
RM references where they are helpful, we just don't find
many such cases.

As Ted very usefully points out it is better to see
  
    1. package x is
    2.    First_Segment : Integer := 3;
    3.    Second_Segment : Integer := Firt_Segment + 1;
                                      |
       >>> "Firt_Segment" is undefined
       >>> possible misspelling of "First_Segment"

    4. end;

(the gnat output) than

      >>> "Firt_Segment" is undefined
      >>> identifiers must be declared before use see RM ..

and this is a perfect case where an RM reference is utterly
and completely gratuitous.

Equally if you write
       
       x := a + b

A message saying missing semicolon is much better than
something like

   incorrect syntax for assignment statement, see RM ...

But I hereby reissue the challenge perhaps this time someone will rise
to it, to give an example of a GNAT
message which does not have an RM reference where an
RM reference would make the message clearer to the user.



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-10-28  1:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-25 22:58 Emacs and Ada Wannabe h4x0r
2001-10-26 13:00 ` Marc A. Criley
2001-10-26 13:32 ` Stephen Leake
2001-10-26 13:33 ` Ted Dennison
2001-10-26 16:50   ` Pascal Obry
2001-10-26 17:15     ` Ted Dennison
2001-10-26 13:42 ` Wes Groleau
2001-10-26 14:56   ` Ted Dennison
2001-10-28  1:39     ` Robert Dewar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox