GNU bug report logs - #6416
next-error mis-highlights ocaml error message locations

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Jacques Le Normand <rathereasy@HIDDEN>; dated Sun, 13 Jun 2010 18:38:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 6416 <at> debbugs.gnu.org:


Received: (at 6416) by debbugs.gnu.org; 14 Jun 2010 13:23:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 14 09:23:23 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OO9dL-0007Ii-Du
	for submit <at> debbugs.gnu.org; Mon, 14 Jun 2010 09:23:23 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.183]
	helo=ironport2-out.pppoe.ca)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1OO9dI-0007Id-Tf
	for 6416 <at> debbugs.gnu.org; Mon, 14 Jun 2010 09:23:21 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AvsEABPKFUxMCoQR/2dsb2JhbACefXK/BoUaBI0C
X-IronPort-AV: E=Sophos;i="4.53,414,1272859200"; d="scan'208";a="67987435"
Received: from 76-10-132-17.dsl.teksavvy.com (HELO alfajor.home)
	([76.10.132.17])
	by ironport2-out.pppoe.ca with ESMTP; 14 Jun 2010 09:23:15 -0400
Received: by alfajor.home (Postfix, from userid 20848)
	id 82DBFAE251; Mon, 14 Jun 2010 09:23:14 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Jacques Le Normand <rathereasy@HIDDEN>
Subject: Re: bug#6416: next-error mis-highlights ocaml error message locations
Message-ID: <jwvsk4piw9n.fsf-monnier+emacs@HIDDEN>
References: <AANLkTinpFZGQkO9yLuLG8GMXVvP8Bo66Npcf5Ja197Al@HIDDEN>
	<jwvaaqyefi3.fsf-monnier+emacs@HIDDEN>
	<AANLkTinjJagGyJZ1_rGMju8eGmNnNnnzazC1XSLNe5rc@HIDDEN>
Date: Mon, 14 Jun 2010 09:23:14 -0400
In-Reply-To: <AANLkTinjJagGyJZ1_rGMju8eGmNnNnnzazC1XSLNe5rc@HIDDEN>
	(Jacques Le Normand's message of "Sun, 13 Jun 2010 19:31:53 -0400")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -2.2 (--)
X-Debbugs-Envelope-To: 6416
Cc: 6416 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.2 (--)

> I apologize, the numbers in the example were erroneous. Take this example
> instead:
[...]
> File "/home/palomer/temp/test.ml", line 2, characters 2-21:

Thanks, that makes more sense.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6416; Package emacs. Full text available.

Message received at 6416 <at> debbugs.gnu.org:


Received: (at 6416) by debbugs.gnu.org; 13 Jun 2010 23:32:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 13 19:32:02 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ONwen-0000Yv-FF
	for submit <at> debbugs.gnu.org; Sun, 13 Jun 2010 19:32:01 -0400
Received: from mail-wy0-f172.google.com ([74.125.82.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <rathereasy@HIDDEN>) id 1ONwek-0000Yq-IX
	for 6416 <at> debbugs.gnu.org; Sun, 13 Jun 2010 19:32:00 -0400
Received: by wyi11 with SMTP id 11so2522371wyi.3
	for <6416 <at> debbugs.gnu.org>; Sun, 13 Jun 2010 16:31:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:received:in-reply-to
	:references:date:message-id:subject:from:to:cc:content-type;
	bh=rucorTfx749uDvUONmjIjwmj4CrpM7tJ5SDlQ7RTBqQ=;
	b=t6NyD6/7K7smsWqY6LwdAbyuK/IU7jzfSxJIUhy0NYKYY1fheJtAikybH0wGAYBQC6
	YzAf39RSWQWIbPW5CQCmnOHmN0c++iouy0tL6Ptf76xPRlp2/c62vaBgGTOO/0mX2Wtr
	ep35oHZggY/i6RV7nsiD1ssRRD8i/wLhioMes=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	b=evKex9qEdRWT6iL0uEuk0lLhetgBl4QxlsiZnoUxRJthVTJRRU9CeHEJalmg+FxdDf
	ztacU6cC9kqimGBLSmU9x5vHA/T82/G1f3sXPvY/4kossxcuJzjLImB8hhD8kEyU1CQX
	0I8A/fL3AYFTMLYGNaUhqgq2fp9/pHAiy81sk=
MIME-Version: 1.0
Received: by 10.216.187.149 with SMTP id y21mr1598136wem.37.1276471913214; 
	Sun, 13 Jun 2010 16:31:53 -0700 (PDT)
Received: by 10.216.52.145 with HTTP; Sun, 13 Jun 2010 16:31:53 -0700 (PDT)
In-Reply-To: <jwvaaqyefi3.fsf-monnier+emacs@HIDDEN>
References: <AANLkTinpFZGQkO9yLuLG8GMXVvP8Bo66Npcf5Ja197Al@HIDDEN>
	<jwvaaqyefi3.fsf-monnier+emacs@HIDDEN>
Date: Sun, 13 Jun 2010 19:31:53 -0400
Message-ID: <AANLkTinjJagGyJZ1_rGMju8eGmNnNnnzazC1XSLNe5rc@HIDDEN>
Subject: Re: bug#6416: next-error mis-highlights ocaml error message locations
From: Jacques Le Normand <rathereasy@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: multipart/alternative; boundary=0016367fb3e3f3f5390488f1c6a0
X-Spam-Score: -3.0 (---)
X-Debbugs-Envelope-To: 6416
Cc: 6416 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.3 (---)

--0016367fb3e3f3f5390488f1c6a0
Content-Type: text/plain; charset=ISO-8859-1

I apologize, the numbers in the example were erroneous. Take this example
instead:

let foo: int =
  "foo"
  ^
    "bar"

gives the error:
File "/home/palomer/temp/test.ml", line 2, characters 2-21:


ocamlc starts counting at 0. it counts newlines and tabs as 1. I obtained
these results empirically.  The previous example means:
"the third character from the start of line 2 to the 22nd character from the
start of line 2"

I've filed a bug report with ocaml developers (and have even suggested a
simple fix.) I can't say how inclined they will be to fix it. The bug id
is 0005070. The mantis url is http://caml.inria.fr/mantis/

thank you for your quick response,
-- Jacques

On Sun, Jun 13, 2010 at 6:46 PM, Stefan Monnier <monnier@HIDDEN>wrote:

> > let foo : int =
> >   "foo"
> >   ^
> >     "bar"
>
> > it gives me the error
>
> > File "/home/palomer/temp/test.ml", line 2, characters 1-21:
> > ...
>
> > which refers to:
> >   "foo"
> >   ^
> >     "bar"
>
> How does 1-21 refer to that, exactly?  The first " seems to be either at
> position 2 or 3 depending on whether you start counting at 0 or 1, so
> how can it be 1-21 rather than 2-<something>?
>
> Second, the 1-21 range refers to bytes in the file, right?  (i.e. does
> it count a TAB as 1 or as 8? how about a CR+LF?).
>
> > next-error will try and highlight characters 1 to 21 on line 2. however,
> > line 2 only contains 10 or so characters. This is because character 21
> > actually refers to character 8 on line 4. Instead of highlighting 3
> lines,
> > only 1 line is highlighted.
>
> Indeed, it's on purpose: I've never heard of a format of error messages
> of a form like the one you describe, so compile.el makes no attempt to
> handle such things, AFAIK.  Usually error messages that can refer to
> several lines take a form like "LINE.COL - LINE'.COL'" or something like
> that where the end-line is specified explicitly.
>
> So in the present case, compile.el guesses that the 21 is really an
> error (maybe because it refers to some other version of the file or
> something) and just stops the line's end.  This behavior is The Right
> Thing for most tools where such errors can never span multiple lines.
>
> The questions above would help us figure out how to best adjust
> compile.el and compilation-regexp-error-alist to handle such errors
> correctly.  Of course, the better solution would be to change OCaml so
> as to use more standard error messages, such as the GNU format, so it
> would "just work".  So I suggest you also file a bug-report to the OCaml
> guys that their error messages use a non-standard format and are
> confusing since they only say "line 2, chars 1-21" even for a message
> that spans lines 2-4.
>
>
>        Stefan
>

--0016367fb3e3f3f5390488f1c6a0
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>I apologize, the numbers in the example were erroneous. Take this exam=
ple instead:</div><div><br></div><div><div>let foo: int =3D=A0</div><div>=
=A0=A0&quot;foo&quot;</div><div>=A0=A0^</div><div>=A0=A0 =A0&quot;bar&quot;=
</div></div><div>
<br></div><div>gives the error:</div><div>File &quot;/home/palomer/temp/<a =
href=3D"http://test.ml">test.ml</a>&quot;, line 2, characters 2-21:</div><b=
r><br><div>ocamlc starts counting at 0. it counts newlines and tabs as 1. I=
 obtained these results empirically. =A0The previous example means:</div>
<div>&quot;the third character from the start of line 2 to the 22nd charact=
er from the start of line 2&quot;</div><div><br></div><div>I&#39;ve filed a=
 bug report with ocaml developers (and have even suggested a simple fix.) I=
 can&#39;t say how inclined they will be to fix it. The bug id is=A00005070=
. The mantis url is <a href=3D"http://caml.inria.fr/mantis/">http://caml.in=
ria.fr/mantis/</a></div>
<div><br></div><div>thank you for your quick response,</div><div>-- Jacques=
</div><div><br><div class=3D"gmail_quote">On Sun, Jun 13, 2010 at 6:46 PM, =
Stefan Monnier <span dir=3D"ltr">&lt;<a href=3D"mailto:monnier@HIDDEN=
l.ca">monnier@HIDDEN</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">&gt; let foo : int =3D<br>
&gt; =A0 &quot;foo&quot;<br>
&gt; =A0 ^<br>
&gt; =A0 =A0 &quot;bar&quot;<br>
<br>
&gt; it gives me the error<br>
<br>
&gt; File &quot;/home/palomer/temp/<a href=3D"http://test.ml" target=3D"_bl=
ank">test.ml</a>&quot;, line 2, characters 1-21:<br>
&gt; ...<br>
<br>
&gt; which refers to:<br>
&gt; =A0 &quot;foo&quot;<br>
&gt; =A0 ^<br>
&gt; =A0 =A0 &quot;bar&quot;<br>
<br>
How does 1-21 refer to that, exactly? =A0The first &quot; seems to be eithe=
r at<br>
position 2 or 3 depending on whether you start counting at 0 or 1, so<br>
how can it be 1-21 rather than 2-&lt;something&gt;?<br>
<br>
Second, the 1-21 range refers to bytes in the file, right? =A0(i.e. does<br=
>
it count a TAB as 1 or as 8? how about a CR+LF?).<br>
<br>
&gt; next-error will try and highlight characters 1 to 21 on line 2. howeve=
r,<br>
&gt; line 2 only contains 10 or so characters. This is because character 21=
<br>
&gt; actually refers to character 8 on line 4. Instead of highlighting 3 li=
nes,<br>
&gt; only 1 line is highlighted.<br>
<br>
Indeed, it&#39;s on purpose: I&#39;ve never heard of a format of error mess=
ages<br>
of a form like the one you describe, so compile.el makes no attempt to<br>
handle such things, AFAIK. =A0Usually error messages that can refer to<br>
several lines take a form like &quot;LINE.COL - LINE&#39;.COL&#39;&quot; or=
 something like<br>
that where the end-line is specified explicitly.<br>
<br>
So in the present case, compile.el guesses that the 21 is really an<br>
error (maybe because it refers to some other version of the file or<br>
something) and just stops the line&#39;s end. =A0This behavior is The Right=
<br>
Thing for most tools where such errors can never span multiple lines.<br>
<br>
The questions above would help us figure out how to best adjust<br>
compile.el and compilation-regexp-error-alist to handle such errors<br>
correctly. =A0Of course, the better solution would be to change OCaml so<br=
>
as to use more standard error messages, such as the GNU format, so it<br>
would &quot;just work&quot;. =A0So I suggest you also file a bug-report to =
the OCaml<br>
guys that their error messages use a non-standard format and are<br>
confusing since they only say &quot;line 2, chars 1-21&quot; even for a mes=
sage<br>
that spans lines 2-4.<br>
<font color=3D"#888888"><br>
<br>
 =A0 =A0 =A0 =A0Stefan<br>
</font></blockquote></div><br></div>

--0016367fb3e3f3f5390488f1c6a0--




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6416; Package emacs. Full text available.

Message received at 6416 <at> debbugs.gnu.org:


Received: (at 6416) by debbugs.gnu.org; 13 Jun 2010 22:46:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 13 18:46:33 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ONvwm-0000G1-Rf
	for submit <at> debbugs.gnu.org; Sun, 13 Jun 2010 18:46:33 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.181]
	helo=ironport2-out.pppoe.ca)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1ONvwk-0000Ft-7I
	for 6416 <at> debbugs.gnu.org; Sun, 13 Jun 2010 18:46:31 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AvsEAMP8FExMCoQR/2dsb2JhbACed3K9RIUaBI0C
X-IronPort-AV: E=Sophos;i="4.53,411,1272859200"; d="scan'208";a="67962376"
Received: from 76-10-132-17.dsl.teksavvy.com (HELO pastel.home)
	([76.10.132.17])
	by ironport2-out.pppoe.ca with ESMTP; 13 Jun 2010 18:46:25 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id 245A980BC; Sun, 13 Jun 2010 18:46:25 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Jacques Le Normand <rathereasy@HIDDEN>
Subject: Re: bug#6416: next-error mis-highlights ocaml error message locations
Message-ID: <jwvaaqyefi3.fsf-monnier+emacs@HIDDEN>
References: <AANLkTinpFZGQkO9yLuLG8GMXVvP8Bo66Npcf5Ja197Al@HIDDEN>
Date: Sun, 13 Jun 2010 18:46:25 -0400
In-Reply-To: <AANLkTinpFZGQkO9yLuLG8GMXVvP8Bo66Npcf5Ja197Al@HIDDEN>
	(Jacques Le Normand's message of "Sun, 13 Jun 2010 14:26:45 -0400")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -2.2 (--)
X-Debbugs-Envelope-To: 6416
Cc: 6416 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.2 (--)

> let foo : int =
>   "foo"
>   ^
>     "bar"

> it gives me the error

> File "/home/palomer/temp/test.ml", line 2, characters 1-21:
> ...

> which refers to:
>   "foo"
>   ^
>     "bar"

How does 1-21 refer to that, exactly?  The first " seems to be either at
position 2 or 3 depending on whether you start counting at 0 or 1, so
how can it be 1-21 rather than 2-<something>?

Second, the 1-21 range refers to bytes in the file, right?  (i.e. does
it count a TAB as 1 or as 8? how about a CR+LF?).

> next-error will try and highlight characters 1 to 21 on line 2. however,
> line 2 only contains 10 or so characters. This is because character 21
> actually refers to character 8 on line 4. Instead of highlighting 3 lines,
> only 1 line is highlighted.

Indeed, it's on purpose: I've never heard of a format of error messages
of a form like the one you describe, so compile.el makes no attempt to
handle such things, AFAIK.  Usually error messages that can refer to
several lines take a form like "LINE.COL - LINE'.COL'" or something like
that where the end-line is specified explicitly.

So in the present case, compile.el guesses that the 21 is really an
error (maybe because it refers to some other version of the file or
something) and just stops the line's end.  This behavior is The Right
Thing for most tools where such errors can never span multiple lines.

The questions above would help us figure out how to best adjust
compile.el and compilation-regexp-error-alist to handle such errors
correctly.  Of course, the better solution would be to change OCaml so
as to use more standard error messages, such as the GNU format, so it
would "just work".  So I suggest you also file a bug-report to the OCaml
guys that their error messages use a non-standard format and are
confusing since they only say "line 2, chars 1-21" even for a message
that spans lines 2-4.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6416; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Jun 2010 18:37:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 13 14:37:38 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ONs3t-0006vt-Ak
	for submit <at> debbugs.gnu.org; Sun, 13 Jun 2010 14:37:37 -0400
Received: from mx10.gnu.org ([199.232.76.166])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <rathereasy@HIDDEN>) id 1ONrtY-0006oD-0z
	for submit <at> debbugs.gnu.org; Sun, 13 Jun 2010 14:26:56 -0400
Received: from lists.gnu.org ([199.232.76.165]:40266)
	by monty-python.gnu.org with esmtps
	(TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60)
	(envelope-from <rathereasy@HIDDEN>) id 1ONrtT-0006uh-I7
	for submit <at> debbugs.gnu.org; Sun, 13 Jun 2010 14:26:51 -0400
Received: from [140.186.70.92] (port=36565 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1ONrtR-0001Zr-Ub
	for bug-gnu-emacs@HIDDEN; Sun, 13 Jun 2010 14:26:51 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	HTML_MESSAGE, T_DKIM_INVALID,
	T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <rathereasy@HIDDEN>) id 1ONrtQ-00039V-KR
	for bug-gnu-emacs@HIDDEN; Sun, 13 Jun 2010 14:26:49 -0400
Received: from mail-ww0-f41.google.com ([74.125.82.41]:57165)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <rathereasy@HIDDEN>) id 1ONrtQ-00039I-9v
	for bug-gnu-emacs@HIDDEN; Sun, 13 Jun 2010 14:26:48 -0400
Received: by wwb34 with SMTP id 34so3278780wwb.0
	for <bug-gnu-emacs@HIDDEN>; Sun, 13 Jun 2010 11:26:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:received:date:message-id
	:subject:from:to:content-type;
	bh=U3VklayL9pe8p2WkBIxYxQ4/jdUFWarOmwi6IkvXoUk=;
	b=m69P0xHkWU6/wf1C1/mDzfiUWldITPralHxDg8Clnxr2gEk5Bh00suvFwck983/wqn
	BBBemuN4QJOr24lPfIPEk2aZKqgxm2gbgHaHqJbdh5s9V3vkA7pd35PBmQFe1z7CuPCd
	OmkYbgXhMwiIJe3dg6m7cfAREDsFFQGEzejvc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:date:message-id:subject:from:to:content-type;
	b=fDokNCMs790gwW0Fxc1V0mJbz9GBOlV906MFtYNoqrZ4zaiBnl6cF/lPU2FjerK0v2
	lv70PVX7cHfhHLsoM3jNl59s3kt8HVFrStFrzwTfVfO5NBF9SsZXnO3KT+zr4GN7VS1v
	HLSnxzlzvAubw8DqqkmN0mHFP0LBLvTREBPVY=
MIME-Version: 1.0
Received: by 10.216.90.133 with SMTP id e5mr1395358wef.77.1276453605380; Sun, 
	13 Jun 2010 11:26:45 -0700 (PDT)
Received: by 10.216.52.145 with HTTP; Sun, 13 Jun 2010 11:26:45 -0700 (PDT)
Date: Sun, 13 Jun 2010 14:26:45 -0400
Message-ID: <AANLkTinpFZGQkO9yLuLG8GMXVvP8Bo66Npcf5Ja197Al@HIDDEN>
Subject: next-error mis-highlights ocaml error message locations
From: Jacques Le Normand <rathereasy@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary=0016e6dab052b8925b0488ed83ce
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6,
	seldom 2.4 (older, 4)
X-Spam-Score: -5.9 (-----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sun, 13 Jun 2010 14:37:35 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.9 (-----)

--0016e6dab052b8925b0488ed83ce
Content-Type: text/plain; charset=ISO-8859-1

Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@HIDDEN mailing list,
and to the gnu.emacs.bug news group.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

if I compile the following with ocamlc:

let foo : int =
  "foo"
  ^
    "bar"

it gives me the error

File "/home/palomer/temp/test.ml", line 2, characters 1-21:
...

which refers to:
  "foo"
  ^
    "bar"

next-error will try and highlight characters 1 to 21 on line 2. however,
line 2 only contains 10 or so characters. This is because character 21
actually refers to character 8 on line 4. Instead of highlighting 3 lines,
only 1 line is highlighted.


If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/22.2/etc/DEBUG for instructions.


In GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2010-03-29 on palmer, modified by Ubuntu
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
configured using `configure  '--build=i486-linux-gnu'
'--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
'--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info'
'--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs22:/etc/emacs:/usr/local/share/emacs/22.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.2/leim'
'--with-x=yes' '--with-x-toolkit=athena' '--with-toolkit-scroll-bars'
'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN
-DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed'
'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_CA.utf8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Tuareg

Minor modes in effect:
  shell-dirtrack-mode: t
  xterm-mouse-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t
  abbrev-mode: t

--0016e6dab052b8925b0488ed83ce
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div><br></div><div>Please write in English if possible, because the Emacs =
maintainers</div><div>usually do not have translators to read other languag=
es for them.</div><div><br></div><div>Your bug report will be posted to the=
 <a href=3D"mailto:bug-gnu-emacs@HIDDEN">bug-gnu-emacs@HIDDEN</a> mailing=
 list,</div>
<div>and to the gnu.emacs.bug news group.</div><div><br></div><div>Please d=
escribe exactly what actions triggered the bug</div><div>and the precise sy=
mptoms of the bug:</div><div><br></div><div>if I compile the following with=
 ocamlc:</div>
<div><br></div><div>let foo : int =3D=A0</div><div>=A0=A0&quot;foo&quot;</d=
iv><div>=A0=A0^=A0</div><div>=A0=A0 =A0&quot;bar&quot;</div><div><br></div>=
<div>it gives me the error=A0</div><div><br></div><div>File &quot;/home/pal=
omer/temp/<a href=3D"http://test.ml">test.ml</a>&quot;, line 2, characters =
1-21:</div>
<div>...</div><div><br></div><div>which refers to:</div><div><div>=A0=A0&qu=
ot;foo&quot;</div><div>=A0=A0^=A0</div><div>=A0=A0 =A0&quot;bar&quot;</div>=
</div><div><br></div><div>next-error will try and highlight characters 1 to=
 21 on line 2. however, line 2 only contains 10 or so characters. This is b=
ecause character 21 actually refers to character 8 on line 4. Instead of hi=
ghlighting 3 lines, only 1 line is highlighted.</div>
<div><br></div><div><br></div><div>If Emacs crashed, and you have the Emacs=
 process in the gdb debugger,</div><div>please include the output from the =
following gdb commands:</div><div>=A0=A0 =A0`bt full&#39; and `xbacktrace&#=
39;.</div>
<div>If you would like to further debug the crash, please read the file</di=
v><div>/usr/share/emacs/22.2/etc/DEBUG for instructions.</div><div><br></di=
v><div><br></div><div>In GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xa=
w3d scroll bars)</div>
<div>=A0of 2010-03-29 on palmer, modified by Ubuntu</div><div>Windowing sys=
tem distributor `The X.Org Foundation&#39;, version 11.0.10706000</div><div=
>configured using `configure =A0&#39;--build=3Di486-linux-gnu&#39; &#39;--h=
ost=3Di486-linux-gnu&#39; &#39;--prefix=3D/usr&#39; &#39;--sharedstatedir=
=3D/var/lib&#39; &#39;--libexecdir=3D/usr/lib&#39; &#39;--localstatedir=3D/=
var&#39; &#39;--infodir=3D/usr/share/info&#39; &#39;--mandir=3D/usr/share/m=
an&#39; &#39;--with-pop=3Dyes&#39; &#39;--enable-locallisppath=3D/etc/emacs=
22:/etc/emacs:/usr/local/share/emacs/22.2/site-lisp:/usr/local/share/emacs/=
site-lisp:/usr/share/emacs/22.2/site-lisp:/usr/share/emacs/site-lisp:/usr/s=
hare/emacs/22.2/leim&#39; &#39;--with-x=3Dyes&#39; &#39;--with-x-toolkit=3D=
athena&#39; &#39;--with-toolkit-scroll-bars&#39; &#39;build_alias=3Di486-li=
nux-gnu&#39; &#39;host_alias=3Di486-linux-gnu&#39; &#39;CFLAGS=3D-DDEBIAN -=
DSITELOAD_PURESIZE_EXTRA=3D5000 -g -O2&#39; &#39;LDFLAGS=3D-g -Wl,--as-need=
ed&#39; &#39;CPPFLAGS=3D&#39;&#39;</div>
<div><br></div><div>Important settings:</div><div>=A0=A0value of $LC_ALL: n=
il</div><div>=A0=A0value of $LC_COLLATE: nil</div><div>=A0=A0value of $LC_C=
TYPE: nil</div><div>=A0=A0value of $LC_MESSAGES: nil</div><div>=A0=A0value =
of $LC_MONETARY: nil</div>
<div>=A0=A0value of $LC_NUMERIC: nil</div><div>=A0=A0value of $LC_TIME: nil=
</div><div>=A0=A0value of $LANG: en_CA.utf8</div><div>=A0=A0locale-coding-s=
ystem: utf-8</div><div>=A0=A0default-enable-multibyte-characters: t</div><d=
iv><br></div><div>
Major mode: Tuareg</div><div><br></div><div>Minor modes in effect:</div><di=
v>=A0=A0shell-dirtrack-mode: t</div><div>=A0=A0xterm-mouse-mode: t</div><di=
v>=A0=A0tooltip-mode: t</div><div>=A0=A0mouse-wheel-mode: t</div><div>=A0=
=A0file-name-shadow-mode: t</div>
<div>=A0=A0global-font-lock-mode: t</div><div>=A0=A0font-lock-mode: t</div>=
<div>=A0=A0blink-cursor-mode: t</div><div>=A0=A0unify-8859-on-encoding-mode=
: t</div><div>=A0=A0utf-translate-cjk-mode: t</div><div>=A0=A0auto-compress=
ion-mode: t</div><div>
=A0=A0line-number-mode: t</div><div>=A0=A0abbrev-mode: t</div><div><br></di=
v>

--0016e6dab052b8925b0488ed83ce--




Acknowledgement sent to Jacques Le Normand <rathereasy@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6416; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.