* compilation-mode support for Guile backtrace; v2 much simplified
@ 2014-08-08 17:51 Jan Nieuwenhuizen
2014-08-08 17:51 ` [PATCH] Support Guile backtraces in compilation mode Jan Nieuwenhuizen
0 siblings, 1 reply; 4+ messages in thread
From: Jan Nieuwenhuizen @ 2014-08-08 17:51 UTC (permalink / raw)
To: emacs-devel, guile-devel
Hi,
Here's a much simplified and collapsed version of compilation-mode
support for Guile backtraces.
In short:
-no resolving trickery of absolute file names, we'll try
to do that upstream
-remaining are the two non-GNU standard Guile convention regexpses
It would be nice we can have Guile-2.2 use GNU-standard error messages
in backtraces, but either way we'll probably have to live with current
guile backtraces for quite some time.
Greetings, Jan
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Support Guile backtraces in compilation mode.
2014-08-08 17:51 compilation-mode support for Guile backtrace; v2 much simplified Jan Nieuwenhuizen
@ 2014-08-08 17:51 ` Jan Nieuwenhuizen
2014-08-09 1:40 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Jan Nieuwenhuizen @ 2014-08-08 17:51 UTC (permalink / raw)
To: emacs-devel, guile-devel
* progmodes/compile.el (compilation-error-regexp-alist-alist):
Add Guile regexpses.
etc/: Add Guile backtrace example.
* compilation.txt (file): Add Guile backtrace example.
test/: Add tests for Guile compile regexps.
* 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 | 18 ++++++++++++++++++
lisp/ChangeLog | 9 +++++++++
lisp/progmodes/compile.el | 2 ++
test/ChangeLog | 6 ++++++
test/automated/compile-tests.el | 7 ++++++-
6 files changed, 45 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 <janneke@gnu.org>
+
+ * compilation.txt (file): Add Guile backtrace example.
+
2014-07-21 Dmitry Antipov <dmantipov@yandex.ru>
* TODO: remove frame height remark.
diff --git a/etc/compilation.txt b/etc/compilation.txt
index e835c57..84da6b9 100644
--- a/etc/compilation.txt
+++ b/etc/compilation.txt
@@ -261,6 +261,24 @@ file:G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found.
{standard input}:27041: Warning: end of file not at end of a line; newline inserted
+* Guile backtraces
+
+Backtrace:
+In ice-9/boot-9.scm:
+ 157: 6 [catch #t #<catch-closure 196e3e0> ...]
+In unknown file:
+ ?: 5 [apply-smob/1 #<catch-closure 196e3e0>]
+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)) #<directory (gud-break) 1962510>]
+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
symbol: lcc
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b3da957..b66d48a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
+2014-08-08 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * progmodes/compile.el (compilation-error-regexp-alist-alist):
+ Add Guile regexpses.
+ (compilation-dynamic-guile-load-path-p)
+ (compilation-guile-get-load-path-command)
+ (compilation-guile-load-path): New variable.
+ (compilation-guile-in-find-file): New function.
+
2014-08-05 Jan Nieuwenhuizen <janneke@gnu.org>
* 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 = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([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'.")
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 <janneke@gnu.org>
+
+ * 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 <rgm@gnu.org>
* 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; newline 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)
+ (equal (caar (compilation--loc->file-struct loc)) file))
(or (null end-col)
(equal (car (cadr (nth 2 (compilation--loc->file-struct loc))))
end-col))
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Support Guile backtraces in compilation mode.
2014-08-08 17:51 ` [PATCH] Support Guile backtraces in compilation mode Jan Nieuwenhuizen
@ 2014-08-09 1:40 ` Stefan Monnier
2014-08-09 7:30 ` Jan Nieuwenhuizen
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2014-08-09 1:40 UTC (permalink / raw)
To: Jan Nieuwenhuizen; +Cc: guile-devel, emacs-devel
> +* Guile backtraces
Please add the Guile version here (ideally, the latest version known to
generate such backtraces).
> + (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).
Other than that, it looks OK, so if someone wants to install it,
go ahead.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Support Guile backtraces in compilation mode.
2014-08-09 1:40 ` Stefan Monnier
@ 2014-08-09 7:30 ` Jan Nieuwenhuizen
0 siblings, 0 replies; 4+ messages in thread
From: Jan Nieuwenhuizen @ 2014-08-09 7:30 UTC (permalink / raw)
To: Stefan Monnier; +Cc: guile-devel, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 729 bytes --]
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
[-- Attachment #2: 0001-Support-Guile-backtraces-in-compilation-mode.patch --]
[-- Type: text/x-diff, Size: 4910 bytes --]
From 7193c30c89868b27d610cd9cc7fa63136d4db44c Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
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 <janneke@gnu.org>
+
+ * compilation.txt (file): Add Guile backtrace example.
+
2014-07-21 Dmitry Antipov <dmantipov@yandex.ru>
* 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 Adapter 'javac' can't be found.
{standard input}:27041: Warning: end of file not at end of a line; newline inserted
+* Guile backtrace, 2.0.11
+
+symbols: guile-file, guile-line
+
+Backtrace:
+In ice-9/boot-9.scm:
+ 157: 6 [catch #t #<catch-closure 196e3e0> ...]
+In unknown file:
+ ?: 5 [apply-smob/1 #<catch-closure 196e3e0>]
+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)) #<directory (gud-break) 1962510>]
+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
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 <janneke@gnu.org>
+
+ * progmodes/compile.el (compilation-error-regexp-alist-alist):
+ Add Guile regexpses.
+
2014-08-05 Jan Nieuwenhuizen <janneke@gnu.org>
* 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 = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([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'.")
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 <janneke@gnu.org>
+
+ * 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 <rgm@gnu.org>
* 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; newline 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)
+ (equal (caar (compilation--loc->file-struct loc)) file))
(or (null end-col)
(equal (car (cadr (nth 2 (compilation--loc->file-struct loc))))
end-col))
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl
[-- Attachment #3: Type: text/plain, Size: 154 bytes --]
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-08-09 7:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-08 17:51 compilation-mode support for Guile backtrace; v2 much simplified Jan Nieuwenhuizen
2014-08-08 17:51 ` [PATCH] Support Guile backtraces in compilation mode Jan Nieuwenhuizen
2014-08-09 1:40 ` Stefan Monnier
2014-08-09 7:30 ` Jan Nieuwenhuizen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).