From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.bugs Subject: bug#28349: 26.0.50; compilation mode syntax highlighting incorrect Date: Mon, 11 Sep 2017 16:33:05 +0100 Message-ID: References: <834lsh2mke.fsf@gnu.org> <83o9qjvjb0.fsf@gnu.org> <87bmmi8o6i.fsf@bapiya> <83r2vetk6c.fsf@gnu.org> <83377tthfd.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a114239f26bb2760558eba681" X-Trace: blaine.gmane.org 1505144080 9624 195.159.176.226 (11 Sep 2017 15:34:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 11 Sep 2017 15:34:40 +0000 (UTC) Cc: 28349@debbugs.gnu.org, Tom Tromey To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 11 17:34:32 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drQj3-0001U0-Mm for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Sep 2017 17:34:17 +0200 Original-Received: from localhost ([::1]:58451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drQjA-0006UF-LY for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Sep 2017 11:34:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drQit-0006Lu-1D for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2017 11:34:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drQio-0001zs-L1 for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2017 11:34:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53275) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1drQio-0001zi-Hs for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2017 11:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1drQio-0006TD-BH for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2017 11:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Sep 2017 15:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28349 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28349-submit@debbugs.gnu.org id=B28349.150514402324832 (code B ref 28349); Mon, 11 Sep 2017 15:34:02 +0000 Original-Received: (at 28349) by debbugs.gnu.org; 11 Sep 2017 15:33:43 +0000 Original-Received: from localhost ([127.0.0.1]:33720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drQiV-0006SR-89 for submit@debbugs.gnu.org; Mon, 11 Sep 2017 11:33:43 -0400 Original-Received: from mail-vk0-f54.google.com ([209.85.213.54]:35489) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drQiT-0006S9-PU for 28349@debbugs.gnu.org; Mon, 11 Sep 2017 11:33:42 -0400 Original-Received: by mail-vk0-f54.google.com with SMTP id w23so1337670vkw.2 for <28349@debbugs.gnu.org>; Mon, 11 Sep 2017 08:33:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=GwUxzn5ya6QMsTV+4L82+HDQ17qtsjlZUI2pp12j+gY=; b=NQqMxYrl7pWke1vETLSAcQj6grSgAro9nIN0VlanP37xSYnCtOiOPtmOgCh5PbG5f3 f59Zmbx0IUbH+iXnzRgW+b9QzxEDoMwzuNNMlNXVfVYXk/9lcd7dcdhTtfNSRzbrW/lq XIA2g1lNVE3LaR8eRWJahaAR92/kTlZ4HboQvDvsf4TLjHoABCSPASWfqmxw2J2q8MvZ a+KVnQ+wlFtjGBlQlz1YXlMz/px7A2bFahydrr3Ew86eNjJ2RpQPPxpomPEfVoiekADG tvKwk84hxQ1dn4eyx2wRV5wYM75Wulpw21AJGtwC5hn4ioSFULqjH1pCaFQsLEpkYQvL msjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=GwUxzn5ya6QMsTV+4L82+HDQ17qtsjlZUI2pp12j+gY=; b=rRXT88jYVDu5sJ8r8BWcOmSujXq84x2LuZ1UnfJ0DVO7cWMLVldsUl0PQCh8BwMp/Z SicAMwFTkgrptlBztGyZAkExraruMTL7/a0zyvITdCUUXhJ96N+7nVXCydGW/5ftxJEO xM0pyqKZ811XIwEKhk3/ypFGFFtr3G4cP89YO7K8kzHXYd7o8kqTHEtCdpLHKLrfqSMK 0mRiI56n4bNSbtBriw2L0sJ0vaXgvwKKgjnMsrqGDFtI1+oyHzmD0bFQowBrBC21ePT9 AxESQygXrJb1OcMi1d2YYJ46ul+6nZLxq5ZZMbVdlDQ3EIyzObXxhiZwnz2MagcdfeI/ cGTg== X-Gm-Message-State: AHPjjUi3YadABOyRY2ULfYfI77g+DFckAlRy80LUhEk3GCmvE/OqGrkd hBgj2CwtTPY2YI1UppFU4hjk2jBbHw== X-Google-Smtp-Source: AOwi7QBYQsSBBCWZNwRd9Y4Fj9v/1nLhTln5alWe6IgJMQMopy61Bg4GQTGKyFqZ/FW3irNeN22ECf4Fpl1yd1bq0qE= X-Received: by 10.31.156.21 with SMTP id f21mr8146543vke.152.1505144016184; Mon, 11 Sep 2017 08:33:36 -0700 (PDT) Original-Received: by 10.159.41.102 with HTTP; Mon, 11 Sep 2017 08:33:05 -0700 (PDT) In-Reply-To: <83377tthfd.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:136786 Archived-At: --001a114239f26bb2760558eba681 Content-Type: text/plain; charset="UTF-8" On 11 Sep 2017 15:54, "Eli Zaretskii" wrote: > From: Richard Copley > Date: Sun, 10 Sep 2017 23:41:45 +0100 > Cc: Tom Tromey , 28349@debbugs.gnu.org > > This is the backtrace when string-match sets the match data to (0 3): So you are saying the problem is in the call to string-match? Or does some code clobber match-data between that call and when the data is used? The call to string-match clobbers the correct match data, which was obtained just before by re-search-forward, in compilation-parse-errors. FYI this is not new and not related to Tom's change as far as I can see. In compilation-parse-errors (compile.el:1426) (upcase comments added): [...] (goto-char start) (while (re-search-forward pat end t) ;; SET MATCH-DATA (when (setq props (compilation-error-properties ;; CLOBBER IT file line end-line col end-col (or type 2) fmt)) [...] ;; USE IT --001a114239f26bb2760558eba681 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On 11 Sep 2017 15:54, "Eli Zaretskii" <eliz@gnu.org> wrote:
> From: Ri= chard Copley <rco= pley@gmail.com>
> Date: Sun, 10 Sep 2017 23:41:45 +0100
> Cc: Tom Tromey <tom@tromey.com>, 28349@debbugs.gnu.org
>
> This is the backtrace when string-match se= ts the match data to (0 3):

So you are saying the problem is in the call to string-match?=C2=A0 O= r does
some code clobber match-data between that call and when the data is
used?

The call to string-match clobbers the correct match = data, which was
obtained just before by= re-search-forward, in compilation-parse-errors.

FYI this is not new and not related to Tom's change as fa= r as I can see.

In compilation-parse-errors (compile.el:1426) (upcase comment= s added):

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [...]
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (goto-char start)
=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 (while (re-search-forward pat end t)=C2=A0 ;; S= ET MATCH-DATA
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (wh= en (setq props (compilation-error-properties ;; CLOBBER IT
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 file line end-line col end-col (or type 2) fmt))
=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 [...]
=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;; USE IT
--001a114239f26bb2760558eba681--