From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Pascal J. Bourguignon" Newsgroups: gmane.emacs.help Subject: Re: emacs, jumping to relative file locations in compiler output. Date: Thu, 27 Mar 2014 17:13:27 +0100 Organization: Informatimago Message-ID: <87siq3ei1k.fsf@kuiper.lan.informatimago.com> References: <5DUYu.30765$4k7.4511@fx31.am4> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1395937016 29589 80.91.229.3 (27 Mar 2014 16:16:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Mar 2014 16:16:56 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 27 17:17:06 2014 Return-path: Envelope-to: geh-help-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 1WTCzK-00075m-DY for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Mar 2014 17:17:06 +0100 Original-Received: from localhost ([::1]:54786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTCzJ-0000GO-V5 for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Mar 2014 12:17:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTCz2-0000Fw-Ko for help-gnu-emacs@gnu.org; Thu, 27 Mar 2014 12:16:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTCyw-0003oh-SO for help-gnu-emacs@gnu.org; Thu, 27 Mar 2014 12:16:48 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:38293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTCyw-0003oL-LX for help-gnu-emacs@gnu.org; Thu, 27 Mar 2014 12:16:42 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WTCyv-0006ob-4F for help-gnu-emacs@gnu.org; Thu, 27 Mar 2014 17:16:41 +0100 Original-Received: from amontsouris-651-1-249-178.w92-163.abo.wanadoo.fr ([92.163.80.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Mar 2014 17:16:41 +0100 Original-Received: from pjb by amontsouris-651-1-249-178.w92-163.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Mar 2014 17:16:41 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 49 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: amontsouris-651-1-249-178.w92-163.abo.wanadoo.fr Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:NjM2MzYxZTBkY2M1MDQwMjE3YTQ4NWZiNTEwOWM1YTJmOTVhYWE3MA== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:96785 Archived-At: glen stark writes: > On Thu, 27 Mar 2014 12:14:57 +0000, glen stark wrote: > >> In the company I'm working for, the build system is set up to cd in >> various directories, and the call make. When a compiler error is >> returned, it is of the form: >> >> In file included from ../../../../include/whatever.h:33:0 >> >> emacs is then unable to determine where to look for the file in >> question. >> >> Changing out build system is big project, but I'd like to be able to >> jump around to compiler errors in emacs. In practice I know what path I >> should substitute for "../../../../" >> >> Is there someway I can tell emacs to regex substitute a fixed path for a >> string of the form "../../"? >> >> Is there an alternative solution to my problem (that doesn't mean >> modifying the build system :) ). >> >> Many thanks, >> >> Glen > > Sorry, I have a follow up: > > After reading more on the subject, I think the path is not the issue. We > are outputing "Entering X" and "Leaving x" messages, so I guess emacs > should be able to handle this. > > The problem might be that the string with the error looks like this: > EE=../../../../include/Check.h: In function 'Bool check::isNull(UShort)': > > If I look at plain old g++ output, I don't see the EE. So perhaps this > is the problem? You can configure regexps to scan the compiler output. cf. compilation-error-regexp-alist and compilation-error-regexp-alist-alist see also compilation-search-path -- __Pascal Bourguignon__ http://www.informatimago.com/ "Le mercure monte ? C'est le moment d'acheter !"