From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.lisp.guile.user Subject: Re: [PATCH 1/3] Support Guile backtraces in compilation mode. Date: Fri, 08 Aug 2014 09:29:32 -0400 Message-ID: References: <1407495956-20322-1-git-send-email-janneke@gnu.org> <1407495956-20322-2-git-send-email-janneke@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1407504601 23087 80.91.229.3 (8 Aug 2014 13:30:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Aug 2014 13:30:01 +0000 (UTC) Cc: guile-user , emacs-devel To: Jan Nieuwenhuizen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 08 15:29:54 2014 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 1XFkF0-0008S4-4I for ged-emacs-devel@m.gmane.org; Fri, 08 Aug 2014 15:29:54 +0200 Original-Received: from localhost ([::1]:51146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFkEz-0004gR-Eu for ged-emacs-devel@m.gmane.org; Fri, 08 Aug 2014 09:29:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFkEn-0004WM-As for emacs-devel@gnu.org; Fri, 08 Aug 2014 09:29:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XFkEf-0000cn-Qf for emacs-devel@gnu.org; Fri, 08 Aug 2014 09:29:41 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:44282) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFkEf-0000bp-Mk; Fri, 08 Aug 2014 09:29:33 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVPAqyKr/2dsb2JhbABZgwaDSsA9gRcXdIImAQEEViMQCzQSFBgNJIgM0hkXjnoHhDgEqwODTCE X-IPAS-Result: ArUGAIDvNVPAqyKr/2dsb2JhbABZgwaDSsA9gRcXdIImAQEEViMQCzQSFBgNJIgM0hkXjnoHhDgEqwODTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="82459775" Original-Received: from 192-171-34-171.cpe.pppoe.ca (HELO pastel.home) ([192.171.34.171]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Aug 2014 09:29:32 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 7499C606A0; Fri, 8 Aug 2014 09:29:32 -0400 (EDT) In-Reply-To: <1407495956-20322-2-git-send-email-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Fri, 8 Aug 2014 13:05:54 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:173478 gmane.lisp.guile.user:11383 Archived-At: > @@ -477,6 +505,8 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?" > ;; > "^\\([^ \t\r\n(]+\\) (\\([0-9]+\\):\\([0-9]+\\)) " > 1 2 3) > + (guile-file "^In \\(.+\\):\n" compilation-guile-in-find-file) > + (guile-line "^ *\\([0-9]+\\): *\\([0-9]+\\)" nil 1 2) > ) > "Alist of values for `compilation-error-regexp-alist'.") Quick comments: - You can collapse all three patches into a single one. - Both of those Guile regexps are much too generic (i.e. likely to appear in non-Guile output), while the corresponding handler you provide is clearly very Guile-specific. This is a *serious* problem. - I think a good way to solve it would be to push the problem upstream ;-) IOW, convince the Guile guys to follow the GNU convention. This could look somewhat like: * Guile backtraces Backtrace: /some/where/ice-9/boot-9.scm:157: 6 [catch #t # ...] unknown file:?: 5 [apply-smob/1 #] /some/where/ice-9/boot-9.scm:63: 4 [call-with-prompt prompt0 ...] /some/where/ice-9/eval.scm:432: 3 [eval # #] unknown file:?: 2 [eval (main (command-line)) #] /home/janneke/vc/guile/examples/gud-break.scm:1038: 1 [main ("gud-break.scm")] 0 [stderr "~a:hello world\n" (# # #)] With the above, you might not even need to change compile.el. Tho, admittedly, the above lines might end up highlighted as "errors" whereas they should probably be treated as "info", so some annotation on the "FILE:LINE:" lines would be helpful to let Emacs know that it's not an "error" location, but just an "info". Not sure if the GNU conventions already include such an annotation, but I can't see why that couldn't be arranged. Stefan