From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan Nieuwenhuizen Newsgroups: gmane.emacs.devel,gmane.lisp.guile.devel Subject: Re: [PATCH] Support Guile backtraces in compilation mode. Date: Sat, 09 Aug 2014 09:30:04 +0200 Organization: AvatarAcademy.nl Message-ID: <878umy3ytf.fsf@drakenvlieg.flower> References: <1407520265-23162-1-git-send-email-janneke@gnu.org> <1407520265-23162-2-git-send-email-janneke@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1407569443 25187 80.91.229.3 (9 Aug 2014 07:30:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Aug 2014 07:30:43 +0000 (UTC) Cc: guile-devel , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 09 09:30:38 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 1XG16o-0000PT-SN for ged-emacs-devel@m.gmane.org; Sat, 09 Aug 2014 09:30:35 +0200 Original-Received: from localhost ([::1]:54403 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XG16n-0001Wh-Mh for ged-emacs-devel@m.gmane.org; Sat, 09 Aug 2014 03:30:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XG16f-0001Wa-37 for emacs-devel@gnu.org; Sat, 09 Aug 2014 03:30:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XG16a-00063y-I1 for emacs-devel@gnu.org; Sat, 09 Aug 2014 03:30:24 -0400 Original-Received: from smtp-vbr7.xs4all.nl ([194.109.24.27]:1952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XG16a-00063q-5H; Sat, 09 Aug 2014 03:30:20 -0400 Original-Received: from drakenvlieg.flower.peder.onsbrabantnet.nl (static.kpn.net [92.70.116.82] (may be forged)) (authenticated bits=0) by smtp-vbr7.xs4all.nl (8.13.8/8.13.8) with ESMTP id s797U4ED010335 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 9 Aug 2014 09:30:05 +0200 (CEST) (envelope-from janneke@gnu.org) X-Url: http://AvatarAcademy.nl In-Reply-To: (Stefan Monnier's message of "Fri, 08 Aug 2014 21:40:47 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Virus-Scanned: by XS4ALL Virus Scanner X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 194.109.24.27 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:173506 gmane.lisp.guile.devel:17314 Archived-At: --=-=-= Content-Type: text/plain Stefan Monnier writes: >> +* Guile backtraces > > Please add the Guile version here (ideally, the latest version known to > generate such backtraces). Done, latest is 2.0.11 >> + (guile-file "^In \\(.+\\):\n" 1) > > AFAICT this will mark those lines as errors (aka red) whereas I think > these should be marked as supplemental info (aka green). Yes, I have raised this question for the new backtrace format. I do not care too much which we choose, however the usual case is that there is only one backtrace and having them red makes stepping with next-error,previous-error easier for me. > Other than that, it looks OK, so if someone wants to install it, > go ahead. Thanks, updated version attached. Greetings, Jan --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-Support-Guile-backtraces-in-compilation-mode.patch Content-Transfer-Encoding: quoted-printable >From 7193c30c89868b27d610cd9cc7fa63136d4db44c Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Fri, 8 Aug 2014 10:24:44 +0200 Subject: [PATCH] Support Guile backtraces in compilation mode. * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Add Guile regexpses. * etc/compilation.txt (file): Add Guile backtrace example. * test/automated/compile-tests.el (compile--test-error-line): Grok FILE being nil. Allows for Guile tests to pass. (compile-tests--test-regexps-data): Add Guile tests. --- etc/ChangeLog | 4 ++++ etc/compilation.txt | 20 ++++++++++++++++++++ lisp/ChangeLog | 5 +++++ lisp/progmodes/compile.el | 2 ++ test/ChangeLog | 6 ++++++ test/automated/compile-tests.el | 7 ++++++- 6 files changed, 43 insertions(+), 1 deletion(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index c0db914..67a70e0 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2014-08-08 Jan Nieuwenhuizen + + * compilation.txt (file): Add Guile backtrace example. + 2014-07-21 Dmitry Antipov =20 * TODO: remove frame height remark. diff --git a/etc/compilation.txt b/etc/compilation.txt index e835c57..919e4db 100644 --- a/etc/compilation.txt +++ b/etc/compilation.txt @@ -261,6 +261,26 @@ file:G:/cygwin/dev/build-myproj.xml:54: Compiler Adapt= er 'javac' can't be found. {standard input}:27041: Warning: end of file not at end of a line; newline= inserted =20 =20 +* Guile backtrace, 2.0.11 + +symbols: guile-file, guile-line + +Backtrace: +In ice-9/boot-9.scm: + 157: 6 [catch #t # ...] +In unknown file: + ?: 5 [apply-smob/1 #] +In ice-9/boot-9.scm: + 63: 4 [call-with-prompt prompt0 ...] +In ice-9/eval.scm: + 432: 3 [eval # #] +In unknown file: + ?: 2 [eval (main (command-line)) #] +In /home/janneke/vc/guile/examples/gud-break.scm: +1038: 1 [main ("gud-break.scm")] +1033: 0 [stderr "~a:hello world\n" (# # #)] + + * Lucid Compiler, lcc 3.x =20 symbol: lcc diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b3da957..5ab9b40 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-08-08 Jan Nieuwenhuizen + + * progmodes/compile.el (compilation-error-regexp-alist-alist): + Add Guile regexpses. + 2014-08-05 Jan Nieuwenhuizen =20 * progmodes/gud.el (guiler): New function. Starts the Guile REPL; diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 000d719..5d3b687 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -477,6 +477,8 @@ File =3D \\(.+\\), Line =3D \\([0-9]+\\)\\(?:, Column = =3D \\([0-9]+\\)\\)?" ;; "^\\([^ \t\r\n(]+\\) (\\([0-9]+\\):\\([0-9]+\\)) " 1 2 3) + (guile-file "^In \\(.+\\):\n" 1) + (guile-line "^ *\\([0-9]+\\): *\\([0-9]+\\)" nil 1 2) ) "Alist of values for `compilation-error-regexp-alist'.") =20 diff --git a/test/ChangeLog b/test/ChangeLog index 4339dc5..92b0d12 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,9 @@ +2014-08-08 Jan Nieuwenhuizen + + * automated/compile-tests.el (compile--test-error-line): Grok FILE + being nil. Allows for Guile tests to pass. + (compile-tests--test-regexps-data): Add Guile tests. + 2014-08-03 Glenn Morris =20 * automated/Makefile.in (check-tar): New rule. diff --git a/test/automated/compile-tests.el b/test/automated/compile-tests= .el index 6c169ee..e231331 100644 --- a/test/automated/compile-tests.el +++ b/test/automated/compile-tests.el @@ -190,6 +190,10 @@ 1 nil 54 "G:/cygwin/dev/build-myproj.xml") ("{standard input}:27041: Warning: end of file not at end of a line; n= ewline inserted" 1 nil 27041 "{standard input}") + ;; Guile + ("In foo.scm:\n" 1 nil nil "foo.scm") + (" 63:4 [call-with-prompt prompt0 ...]" 1 4 63 nil) + ("1038: 1 [main (\"gud-break.scm\")]" 1 1 1038 nil) ;; lcc ("E, file.cc(35,52) Illegal operation on pointers" 1 52 35 "file.cc") ("W, file.cc(36,52) blah blah" 1 52 36 "file.cc") @@ -338,7 +342,8 @@ END-LINE, if that matched.") (setq end-line (cdr line) line (car line))) (and (equal (compilation--loc->col loc) col) (equal (compilation--loc->line loc) line) - (equal (caar (compilation--loc->file-struct loc)) file) + (or (not file)=20 + (equal (caar (compilation--loc->file-struct loc)) file)) (or (null end-col) (equal (car (cadr (nth 2 (compilation--loc->file-struct loc)))) end-col)) --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.nl= =20=20 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.nl= =20=20 --=-=-=--