From: Jonathan Protzenko <jonathan.protzenko@gmail.com>
To: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
Cc: William Smith <bills@emu-bark.com>,
Caml-list <caml-list@inria.fr>,
Gabriel Scherer <gabriel.scherer@gmail.com>
Subject: Re: [Caml-list] modified error messages for ocamlc
Date: Sun, 14 Apr 2013 20:19:32 +0200 [thread overview]
Message-ID: <516AF334.2040202@gmail.com> (raw)
In-Reply-To: <93F65479FCAB425282517E571DA027D9@erratique.ch>
The OCaml mode for emacs that's distributed along with the OCaml
sources contains (caml.el) :
796 ;; Newer emacs versions support line/char ranges
797 ;; We will adapt OCaml to output error messages in a compatible
format.
798 ;; In the meantime we add the new format here in addition to the
old one.
799 (defconst caml-error-regexp-newstyle
800 "^[ A-\377]+ \"\\([^\"\n]+\\)\", line \\([0-9]+\\), char
\\([0-9]+\\) to line \\([0-9]+\\), char \\([0-9]+\\):"
801 "Regular expression matching the error messages produced by
ocamlc/ocamlopt.")
So there are provisions already in the Emacs mode for parsing
multi-line error formats. What refrains us from switching directly to
the format that's recognized by the already-distributed Caml mode ?
Cheers,
jonathan
On Sun 14 Apr 2013 07:57:36 PM CEST, Daniel Bünzli wrote:
> Le dimanche, 14 avril 2013 à 18:06, Gabriel Scherer a écrit :
>>>> Would there be any interest in me making the change everywhere and submitting it as a patch?
>>>
>>> Not at all...
>> I'm not sure if this is a language barrier thing, or sarcasm/irony
>> that got lost on the wire,
>
> No, it was a true answer, I'm not interesting in having changes introduced in ocaml that break features that are useful to me *every* day. Namely the ability of compilation-mode to precisely hilight the span of an error in my source, without having to tweak my .emacs. (That's said I'd have nothing against an implementation of gnu's standard).
>
>
>> On a related note, I have put in
>> http://caml.inria.fr/mantis/view.php?id=5044 some hooks for Emacs
>> compile-mode to parse additional error messages that are not supported
>> by default, namely the backtrace format and the location printed in
>> the 'assert false' error message.
>
> I still don't understand your issue here. For me everything works pefectly out of the box, character ranges included (or maybe I never fell on a specific case ?).
>
>> This is so convenient that I often
>> feed "ocamlbuild test.byte && ./test.byte" as my compilation command
>> in my edit-compile-test cycles.
>
> Yes, that's also what I do.
>
> Best,
>
> Daniel
>
>
>
next prev parent reply other threads:[~2013-04-14 18:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-14 15:20 William Smith
2013-04-14 16:25 ` Daniel Bünzli
2013-04-14 17:06 ` Gabriel Scherer
2013-04-14 17:57 ` Daniel Bünzli
2013-04-14 18:19 ` Jonathan Protzenko [this message]
2013-04-14 19:18 ` Daniel Bünzli
2013-04-14 20:01 ` [Caml-list] " Christopher Zimmermann
2013-04-15 15:37 ` [Caml-list] " Jacques Le Normand
2013-04-15 6:26 ` Raphaël Proust
2013-04-16 0:32 ` [Caml-list] " Stefan Monnier
2013-04-18 16:40 [Caml-list] " William Smith
2013-04-21 7:37 ` Gabriel Scherer
2013-04-21 10:53 ` Daniel Bünzli
2013-04-21 11:28 ` Gabriel Scherer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=516AF334.2040202@gmail.com \
--to=jonathan.protzenko@gmail.com \
--cc=bills@emu-bark.com \
--cc=caml-list@inria.fr \
--cc=daniel.buenzli@erratique.ch \
--cc=gabriel.scherer@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox