From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.bugs Subject: bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode Date: Sat, 20 Sep 2014 11:10:31 +0200 Message-ID: <87fvfmverc.fsf@engster.org> References: <541042F8.1090202@simpack.de> <0hwq9b70oi.fsf@fencepost.gnu.org> <541149F2.1010202@simpack.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1411205201 3300 80.91.229.3 (20 Sep 2014 09:26:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Sep 2014 09:26:41 +0000 (UTC) Cc: "18444@debbugs.gnu.org" <18444@debbugs.gnu.org>, Martin Apel To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 20 11:26:33 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XVGw5-0005Tj-7L for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Sep 2014 11:26:33 +0200 Original-Received: from localhost ([::1]:33950 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVGw4-0003Oi-MM for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Sep 2014 05:26:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVGvw-0003OT-TA for bug-gnu-emacs@gnu.org; Sat, 20 Sep 2014 05:26:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVGvq-0000yp-EE for bug-gnu-emacs@gnu.org; Sat, 20 Sep 2014 05:26:24 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54743) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVGvq-0000xI-1s for bug-gnu-emacs@gnu.org; Sat, 20 Sep 2014 05:26:18 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XVGi2-0002aZ-8F for bug-gnu-emacs@gnu.org; Sat, 20 Sep 2014 05:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Engster Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Sep 2014 09:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18444 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18444-submit@debbugs.gnu.org id=B18444.14112042709881 (code B ref 18444); Sat, 20 Sep 2014 09:12:02 +0000 Original-Received: (at 18444) by debbugs.gnu.org; 20 Sep 2014 09:11:10 +0000 Original-Received: from localhost ([127.0.0.1]:46295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XVGhB-0002ZI-SE for submit@debbugs.gnu.org; Sat, 20 Sep 2014 05:11:10 -0400 Original-Received: from randomsample.de ([5.45.97.173]:37397) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XVGh8-0002Z9-L7 for 18444@debbugs.gnu.org; Sat, 20 Sep 2014 05:11:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=EeK/rBf+xs5xHnm5JvQfupduhQ4vTZ2C4xOjvvcQH84=; b=ewFPmabpg2NtLRV7wMVs+XVkg5eFbYIoIGg/Yu4NdRqKomPhr0NQ66Yb6uF/Y/7vlgEQWtf9wgnZkRzyQFO6vrjzEIHEVUVVRKRVLECg2zj4wb10XXUNkR1lqquY5Bci; Original-Received: from dslc-082-082-164-097.pools.arcor-ip.net ([82.82.164.97] helo=desk) by randomsample.de with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XVGh2-00035j-CH; Sat, 20 Sep 2014 11:11:05 +0200 In-Reply-To: (Glenn Morris's message of "Thu, 11 Sep 2014 19:29:19 -0400") User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3.93 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:93550 Archived-At: Glenn Morris writes: > Glenn Morris wrote: > >> (I think it mistakenly tries to find a hit in the "Grep started" line for >> some reason.) > > It's because > > Grep started at Thu Sep 11 16:25:19 > > matches the first element of grep-regexp-alist: > > "^\\(.+?\\)\\(:[ \t]*\\)\\([1-9][0-9]*\\)\\2" I've looked into this a bit, and I think this must be fixed in compile.el itself. The underlying problem is that compile.el will parse its own output for errors, and this is clearly wrong. This does not only happen with the the above "Grep started at ..." message, but also the final line "Grep finished (...) at". Funny thing is that RMS himself had seen this latter problem as well in 2002, and added the following to `compilation-handle-exit' (rev. 42924): ;; Prevent that message from being recognized as a compilation error. (add-text-properties omax (point) (append '(compilation-handle-exit t) nil)) However, that part which actually checked for that text property in `compilation-parse-errors' somehow vanished in one of the later refactorings, so that does not work anymore. I see the following ways to solve this: - Following RMS initial idea, use a text property to mark text which should not be parsed for errors. - Use buffer-local-variables to remember where the actual compilation/grep output starts and ends, and use that as an lower/upper bound when calling `compilation--parse-region' in `compilation--ensure-parse'. Whatever we do to fix it, I'm leaning towards doing this in trunk. The code in compile.el is quite intricate, and it's easy to make mistakes. Also, this was apparently broken for years... -David