* Error messages in Caml &co
@ 1996-10-10 14:35 Basile Starynkevitch - LETR/IA
1996-10-16 7:50 ` Xavier Leroy
1996-10-16 14:45 ` Ian T Zimmerman
0 siblings, 2 replies; 3+ messages in thread
From: Basile Starynkevitch - LETR/IA @ 1996-10-10 14:35 UTC (permalink / raw)
To: caml-list
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1698 bytes --]
(sorry if you read this 3 times; i'm reposting it since i'm getting
"Service unavailable" from concorde.inria.fr - perhaps a local problem)
Just a tiny suggestion for proud caml authors
Make caml error messages compatible with Emacs conventions, for
instance compatible with GNU error message convention
filename:number: error message
Otherwise, give a hint regarding the value of the Emacs variable for
parsing error messages; I've added to my ~/.emacs
(setq
compilation-error-regexp-alist
(append compilation-error-regexp-alist
'(
(".*lines? \\([0-9]+\\)[ \t]+of[ \t]+\"?\\([^\":\n]+\\)\"?"
3 2)
)
)
)
But I am not sure it is correct. If people have a better value, please
tell it!
(If Caml followed usual GNU practice, I won't have to add this).
I do know that CAML is not under GNU license, but many published
compilers follow the GNU convention (which I find ok).
N.B. Any opinions expressed here are solely mine, and not of my organization.
N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA.
Please cite a *pertinent part* of my mail in all answers
Veuillez citer une *partie pertinente* de mon courrier dans vos reponses
----------------------------------------------------------------------
Basile STARYNKEVITCH ---- Commissariat à l Energie Atomique
DRN/DMT/SERMA * CEA/Saclay bat.470 * 91191 GIF/YVETTE CEDEX * France
fax: (33) 01,69.08.85.68; phone: 01,69.08.40.66; home: 01,46.65.45.53
email: Basile.Starynkevitch@cea.fr (or else basile@soleil.serma.cea.fr);
I speak french, english, russian. Je parle français, anglais, russe.
----------------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Error messages in Caml &co
1996-10-10 14:35 Error messages in Caml &co Basile Starynkevitch - LETR/IA
@ 1996-10-16 7:50 ` Xavier Leroy
1996-10-16 14:45 ` Ian T Zimmerman
1 sibling, 0 replies; 3+ messages in thread
From: Xavier Leroy @ 1996-10-16 7:50 UTC (permalink / raw)
To: Basile Starynkevitch - LETR/IA; +Cc: caml-list
> Just a tiny suggestion for proud caml authors
> Make caml error messages compatible with Emacs conventions, for
> instance compatible with GNU error message convention
> filename:number: error message
> Otherwise, give a hint regarding the value of the Emacs variable for
> parsing error messages; I've added to my ~/.emacs
Recent versions of Emacs (e.g. 19.30) understand perfectly well the
Caml error messages. (I wrote the Emacs maintainers about three years
ago asking them to add the correct regexp for Caml.)
If you're using an old version of Emacs, the caml.el file distributed
along with Caml Light (in contrib/camlmode) adds the correct regexp
for parsing Caml error messages. It also provides a refined
"next-error" function that highlights the error location more
precisely than Emacs normally does.
Ian Zimmerman's "electric" Caml mode for Emacs
(ftp://pauillac.inria.fr/lang/caml-light/Usercontribs)
provides the same support for Caml error messages.
- Xavier Leroy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Error messages in Caml &co
1996-10-10 14:35 Error messages in Caml &co Basile Starynkevitch - LETR/IA
1996-10-16 7:50 ` Xavier Leroy
@ 1996-10-16 14:45 ` Ian T Zimmerman
1 sibling, 0 replies; 3+ messages in thread
From: Ian T Zimmerman @ 1996-10-16 14:45 UTC (permalink / raw)
To: Basile Starynkevitch - LETR/IA; +Cc: caml-list
In article <199610101435.QAA14156@mimas.serma.cea.fr> Basile
Starynkevitch - LETR/IA <basile@mimas.saclay.cea.fr> writes:
> Make caml error messages compatible with Emacs conventions, for
> instance compatible with GNU error message convention
> filename:number: error message
Caml does more than most compilers: it reports the column number where
the error occurred, not just the line number. That's why the format
is different.
>
> Otherwise, give a hint regarding the value of the Emacs variable for
> parsing error messages; I've added to my ~/.emacs
>
> (setq
> compilation-error-regexp-alist
> (append compilation-error-regexp-alist
> '(
> (".*lines? \\([0-9]+\\)[ \t]+of[ \t]+\"?\\([^\":\n]+\\)\"?"
> 3 2)
> )
> )
> )
>
> But I am not sure it is correct. If people have a better value,
> please tell it!
>
Please see the elisp code: the exact messages depend on the local
language, hence your regex probably won't work in the German version
(for one: lines => Zeilen).
You may want to check out my extensions to Caml Emacs tools, available
on
ftp://ftp.rahul.net/pub/itz
and the usual elisp archives (I hope).
They have not been updated for ocaml (or csl), though, because I don't
want to deal with unfortunate gratituous syntax incompatibilities.
(Has anyone out there tried that? How do you cope eg. with the '
character being used both in char literals and type variables?)
--
Ian T Zimmerman <itz@rahul.net>
Days spent working only for oneself are twice wasted;
it would have been better not to work at all.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1996-10-16 14:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-10-10 14:35 Error messages in Caml &co Basile Starynkevitch - LETR/IA
1996-10-16 7:50 ` Xavier Leroy
1996-10-16 14:45 ` Ian T Zimmerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox