From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: filename with new compile.el Date: Sat, 06 Oct 2012 13:44:32 -0400 Message-ID: References: <506C7E6A.7010702@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1349545483 17860 80.91.229.3 (6 Oct 2012 17:44:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Oct 2012 17:44:43 +0000 (UTC) Cc: emacs-devel@gnu.org To: Reto Zimmermann Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 06 19:44:49 2012 Return-path: Envelope-to: ged-emacs-devel@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 1TKYQe-0007Hf-8b for ged-emacs-devel@m.gmane.org; Sat, 06 Oct 2012 19:44:44 +0200 Original-Received: from localhost ([::1]:56765 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKYQY-000814-Fm for ged-emacs-devel@m.gmane.org; Sat, 06 Oct 2012 13:44:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKYQW-000808-JT for emacs-devel@gnu.org; Sat, 06 Oct 2012 13:44:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKYQV-0004iG-NA for emacs-devel@gnu.org; Sat, 06 Oct 2012 13:44:36 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:36861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKYQU-0004h7-3Q; Sat, 06 Oct 2012 13:44:34 -0400 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q96HiWVT022906; Sat, 6 Oct 2012 13:44:32 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 48238B40A1; Sat, 6 Oct 2012 13:44:32 -0400 (EDT) In-Reply-To: <506C7E6A.7010702@gnu.org> (Reto Zimmermann's message of "Wed, 03 Oct 2012 20:05:30 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:154133 Archived-At: > In the old compile.el there was variable compilation-file-regexp-alist > for this purpose. By "old" you mean the one in Emacs < 22, right? > From the comments for variable compilation-error-regexp-alist it > sounds like this type of filename parsing is still possible but > I can't figure out how. There doesn't seem to be an example for this > in the predefined regexp settings. IIUC the way it works is that you have one regexp that matches the message with the file name (can have nil for its LINE/COLUMN info), and then have another that matches the messages without file name (this one will have nil for the FILE part but presumably non-nil for the LINE and maybe COLUMN part). If you look at the way compile-internal was implemented in Emacs-22 and 23 (quoted below), you see you should be able to just use your compilation-file-regexp-alist entries directly in compilation-error-regexp-alist (assuming that worked in Emacs-23). Stefan (defun compile-internal (command error-message &optional name-of-mode parser error-regexp-alist name-function enter-regexp-alist leave-regexp-alist file-regexp-alist nomessage-regexp-alist no-async highlight-regexp local-map) (if parser (error "Compile now works very differently, see `compilation-error-regexp-alist'")) (let ((compilation-error-regexp-alist (append file-regexp-alist (or error-regexp-alist compilation-error-regexp-alist))) (compilation-error (replace-regexp-in-string "^No more \\(.+\\)s\\.?" "\\1" error-message))) (compilation-start command nil name-function highlight-regexp)))