From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Getting the "explanation" part of the current error message Date: Wed, 27 Jan 2010 07:00:18 -0700 Message-ID: References: <290eb05e-504b-4a8a-8ce2-5c9fed9851a3@k35g2000yqb.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1264601649 24718 80.91.229.12 (27 Jan 2010 14:14:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Jan 2010 14:14:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 27 15:13:49 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Na8dn-0002rR-4N for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jan 2010 15:13:07 +0100 Original-Received: from localhost ([127.0.0.1]:34722 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Na8do-0000La-3e for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jan 2010 09:13:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Na8SA-0003rJ-RW for help-gnu-emacs@gnu.org; Wed, 27 Jan 2010 09:01:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Na8S5-0003pG-7e for help-gnu-emacs@gnu.org; Wed, 27 Jan 2010 09:01:05 -0500 Original-Received: from [199.232.76.173] (port=46322 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Na8S4-0003p8-NZ for help-gnu-emacs@gnu.org; Wed, 27 Jan 2010 09:01:00 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:53025) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Na8S4-0005ZW-1e for help-gnu-emacs@gnu.org; Wed, 27 Jan 2010 09:01:00 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1Na8Rw-0006jL-6y for help-gnu-emacs@gnu.org; Wed, 27 Jan 2010 15:00:52 +0100 Original-Received: from c-71-237-24-138.hsd1.co.comcast.net ([71.237.24.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Jan 2010 15:00:52 +0100 Original-Received: from kevin.d.rodgers by c-71-237-24-138.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Jan 2010 15:00:52 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-24-138.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) In-Reply-To: <290eb05e-504b-4a8a-8ce2-5c9fed9851a3@k35g2000yqb.googlegroups.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:71511 Archived-At: Nordlöw wrote: > Hi! > > I'm looking for a way to take the "explanation" part of a (GCC or > other) compilation info/warning/error message and display it > separately in the minibuffer or as a tooltip near the problem source > code line. > > I have looked at the sources simple.el compile.el specifically at > compilation-next-error-function() but I don't find any structure that > contains the (pre-)parsed messages of the compilation-buffer contents. > Does such a structure exists? If so we could extended it with the > "explanation" part and visualize in next-error-hook. If not I guess we > need to use compilation-error-regexp-alist-alist and to separately > parse the compilation-buffer, right? compilation-error-regexp-alist does not provide a way to extract the message from the output, it only provides a way to extract the FILE, LINE, COLUMN, and TYPE. And compile.el no longer parses the output itself (since 2004-03-11), it relies on font lock. I would avoid reparsing the output buffer, and instead rely on the text properties set by font lock in an advice run after compilation-next-error-function. -- Kevin Rodgers Denver, Colorado, USA