unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: emacs-devel <emacs-devel@gnu.org>
Subject: update to latest bzr: Guile patches for GUD, compilation-mode
Date: Sun, 10 Aug 2014 14:47:10 +0200	[thread overview]
Message-ID: <87fvh4341d.fsf@drakenvlieg.flower> (raw)

[-- Attachment #1: Type: text/plain, Size: 369 bytes --]

Hi,

I have updated my patches (the ChangeLogs) against latest bzr.  Hope
that's helpful.  Attached as bundles and GIT patches.

Not sure what's most helpful for you; what we did in LibreOffice, was
to send the ChangeLog bit verbatim and omit it from the patch and have
the committer add it to the ChangeLog, as it "always" conflicts.

Hope this helps, Greetings,
Jan


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Initial-Guile-REPL-guiler-debugger-support-for-GUD.patch --]
[-- Type: text/x-diff, Size: 6718 bytes --]

From 57e8a4b8957a66f5a6cffebc33c518fc0d45c1cf Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Mon, 4 Aug 2014 11:15:59 +0200
Subject: [PATCH 1/2] Initial Guile REPL (guiler) debugger support for GUD.

	* progmodes/gud.el (guiler): New function.  Starts the Guile REPL;
	add Guile debugger support for GUD.
---
 lisp/ChangeLog        |  5 +++
 lisp/progmodes/gud.el | 89 ++++++++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 89 insertions(+), 5 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3e39440..1637187 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-08-05  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+	* progmodes/gud.el (guiler): New function.  Starts the Guile REPL;
+	add Guile debugger support for GUD.
+	
 2014-08-09  Juri Linkov  <juri@jurta.org>
 
 	* vc/vc-annotate.el (vc-annotate-background-mode): Add :set
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index c6fc944..09085f7 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -34,7 +34,8 @@
 ;; and added a menu. Brian D. Carlstrom <bdc@ai.mit.edu> combined the IRIX
 ;; kluge with the gud-xdb-directories hack producing gud-dbx-directories.
 ;; Derek L. Davies <ddavies@world.std.com> added support for jdb (Java
-;; debugger.)
+;; debugger.)  Jan Nieuwenhuizen added support for the Guile REPL (Guile
+;; debugger).
 
 ;;; Code:
 
@@ -140,7 +141,7 @@ Used to gray out relevant toolbar icons.")
 			       (display-graphic-p)
 			       (fboundp 'x-show-tip))
 		  :visible (memq gud-minor-mode
-				'(gdbmi dbx sdb xdb pdb))
+				'(gdbmi guiler dbx sdb xdb pdb))
 	          :button (:toggle . gud-tooltip-mode))
     ([refresh]	"Refresh" . gud-refresh)
     ([run]	menu-item "Run" gud-run
@@ -170,11 +171,11 @@ Used to gray out relevant toolbar icons.")
     ([up]	menu-item "Up Stack" gud-up
 		  :enable (not gud-running)
 		  :visible (memq gud-minor-mode
-				 '(gdbmi gdb dbx xdb jdb pdb)))
+				 '(gdbmi gdb guiler dbx xdb jdb pdb)))
     ([down]	menu-item "Down Stack" gud-down
 		  :enable (not gud-running)
 		  :visible (memq gud-minor-mode
-				 '(gdbmi gdb dbx xdb jdb pdb)))
+				 '(gdbmi gdb guiler dbx xdb jdb pdb)))
     ([pp]	menu-item "Print S-expression" gud-pp
                   :enable (and (not gud-running)
 				  (bound-and-true-p gdb-active-process))
@@ -195,7 +196,7 @@ Used to gray out relevant toolbar icons.")
     ([finish]	menu-item "Finish Function" gud-finish
                   :enable (not gud-running)
 		  :visible (memq gud-minor-mode
-				 '(gdbmi gdb xdb jdb pdb)))
+				 '(gdbmi gdb guiler xdb jdb pdb)))
     ([stepi]	menu-item "Step Instruction" gud-stepi
                   :enable (not gud-running)
 		  :visible (memq gud-minor-mode '(gdbmi gdb dbx)))
@@ -1704,6 +1705,83 @@ and source-file directory for your debugger."
   (run-hooks 'pdb-mode-hook))
 \f
 ;; ======================================================================
+;; Guile REPL (guiler) functions
+
+;; History of argument lists passed to guiler.
+(defvar gud-guiler-history nil)
+
+(defvar gud-guiler-lastfile nil)
+
+(defun gud-guiler-marker-filter (string)
+  (setq gud-marker-acc (if gud-marker-acc (concat gud-marker-acc string) string))
+
+  (let ((start 0))
+    (while
+	(cond
+	 ((string-match "^In \\(.*\\):" gud-marker-acc start)
+          (setq gud-guiler-lastfile (match-string 1 gud-marker-acc)))
+	 ((string-match "^\\([^:\n]+\\):\\([0-9]+\\):\\([0-9]+\\):[^\n]*"
+			gud-marker-acc start)
+          (setq gud-guiler-lastfile (match-string 1 gud-marker-acc))
+          (setq gud-last-frame
+                (cons gud-guiler-lastfile
+                      (string-to-number (match-string 2 gud-marker-acc)))))
+	 ((string-match "^[ ]*\\([0-9]+\\):\\([0-9]+\\)  [^\n]*"
+			gud-marker-acc start)
+          (if gud-guiler-lastfile
+              (setq gud-last-frame
+                    (cons gud-guiler-lastfile
+                          (string-to-number (match-string 1 gud-marker-acc))))))
+	 ((string-match comint-prompt-regexp gud-marker-acc start) t)
+         ((string= (substring gud-marker-acc start) "") nil)
+         (t nil))
+      (setq start (match-end 0)))
+
+    ;; Search for the last incomplete line in this chunk
+    (while (string-match "\n" gud-marker-acc start)
+      (setq start (match-end 0)))
+
+    ;; If we have an incomplete line, store it in gud-marker-acc.
+    (setq gud-marker-acc (substring gud-marker-acc (or start 0))))
+  string)
+
+
+(defcustom gud-guiler-command-name "guile"
+  "File name for executing the Guile debugger.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'gud)
+
+;;;###autoload
+(defun guiler (command-line)
+  "Run guiler on program FILE in buffer `*gud-FILE*'.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger."
+  (interactive
+   (list (gud-query-cmdline 'guiler)))
+
+  (gud-common-init command-line nil 'gud-guiler-marker-filter)
+  (setq-local gud-minor-mode 'guiler)
+
+;; FIXME: absolute file-names are not grokked yet by Guile's ,break-at-source
+;; and relative file names only when relative to %load-path.
+;;  (gud-def gud-break  ",break-at-source %d%f %l"  "\C-b" "Set breakpoint at current line.")
+  (gud-def gud-break  ",break-at-source %f %l"  "\C-b" "Set breakpoint at current line.")
+;; FIXME: remove breakpoint with file-line not yet supported by Guile
+;;  (gud-def gud-remove ",delete ---> %d%f:%l"  "\C-d" "Remove breakpoint at current line")
+  (gud-def gud-step   ",step"         "\C-s" "Step one source line with display.")
+  (gud-def gud-next   ",next"         "\C-n" "Step one line (skip functions).")
+;;  (gud-def gud-cont   "continue"     "\C-r" "Continue with display.")
+  (gud-def gud-finish ",finish"       "\C-f" "Finish executing current function.")
+  (gud-def gud-up     ",up"           "<" "Up one stack frame.")
+  (gud-def gud-down   ",down"         ">" "Down one stack frame.")
+  (gud-def gud-print  "%e"            "\C-p" "Evaluate Guile expression at point.")
+
+  (setq comint-prompt-regexp "^scheme@([^>]+> ")
+  (setq paragraph-start comint-prompt-regexp)
+  (run-hooks 'guiler-mode-hook))
+\f
+;; ======================================================================
 ;;
 ;; JDB support.
 ;;
@@ -3450,6 +3528,7 @@ With arg, dereference expr if ARG is positive, otherwise do not dereference."
   "Return a suitable command to print the expression EXPR."
   (pcase gud-minor-mode
     (`gdbmi (concat "-data-evaluate-expression \"" expr "\""))
+    (`guiler expr)
     (`dbx (concat "print " expr))
     ((or `xdb `pdb) (concat "p " expr))
     (`sdb (concat expr "/"))))
-- 
1.9.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-Support-Guile-backtraces-in-compilation-mode.patch --]
[-- Type: text/x-diff, Size: 4673 bytes --]

From f99a67e666c489c3579e71f3e60672aa6f657b38 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Fri, 8 Aug 2014 10:24:44 +0200
Subject: [PATCH 2/2] 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 a323a1f..7d92a5b 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-08-09  Reuben Thomas  <rrt@sc3d.org>
 
 	* PROBLEMS: Remove msdos/is_exec.c and sigaction.c.
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 1637187..66eed80 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 9ca9353..98ff11e 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-07  Glenn Morris  <rgm@gnu.org>
 
 	* automated/Makefile.in (check-tar): Remove, hydra recipe does it now.
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))
-- 
1.9.1


[-- Attachment #4: 1-Initial-guile-REPL-debugger-support-for-GUD.bundle --]
[-- Type: application/octet-stream, Size: 6552 bytes --]

# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: janneke@gnu.org-20140810120016-hh49ftaf2xvkqio2
# target_branch: /home/janneke/vc/emacs.bzr/trunk
# testament_sha1: a76231c073cfb5c6d760f3aefe1d27638af590a0
# timestamp: 2014-08-10 14:01:36 +0200
# base_revision_id: rudalics@gmx.at-20140810082628-yd1f17pywagthxdf
# 
# Begin patch
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2014-08-09 23:55:39 +0000
+++ lisp/ChangeLog	2014-08-10 12:00:16 +0000
@@ -1,3 +1,8 @@
+2014-08-05  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+	* progmodes/gud.el (guiler): New function.  Starts the Guile REPL;
+	add Guile debugger support for GUD.
+	
 2014-08-09  Juri Linkov  <juri@jurta.org>
 
 	* vc/vc-annotate.el (vc-annotate-background-mode): Add :set

=== modified file 'lisp/progmodes/gud.el'
--- lisp/progmodes/gud.el	2014-02-10 01:34:22 +0000
+++ lisp/progmodes/gud.el	2014-08-10 12:00:16 +0000
@@ -34,7 +34,8 @@
 ;; and added a menu. Brian D. Carlstrom <bdc@ai.mit.edu> combined the IRIX
 ;; kluge with the gud-xdb-directories hack producing gud-dbx-directories.
 ;; Derek L. Davies <ddavies@world.std.com> added support for jdb (Java
-;; debugger.)
+;; debugger.)  Jan Nieuwenhuizen added support for the Guile REPL (Guile
+;; debugger).
 
 ;;; Code:
 
@@ -140,7 +141,7 @@
 			       (display-graphic-p)
 			       (fboundp 'x-show-tip))
 		  :visible (memq gud-minor-mode
-				'(gdbmi dbx sdb xdb pdb))
+				'(gdbmi guiler dbx sdb xdb pdb))
 	          :button (:toggle . gud-tooltip-mode))
     ([refresh]	"Refresh" . gud-refresh)
     ([run]	menu-item "Run" gud-run
@@ -170,11 +171,11 @@
     ([up]	menu-item "Up Stack" gud-up
 		  :enable (not gud-running)
 		  :visible (memq gud-minor-mode
-				 '(gdbmi gdb dbx xdb jdb pdb)))
+				 '(gdbmi gdb guiler dbx xdb jdb pdb)))
     ([down]	menu-item "Down Stack" gud-down
 		  :enable (not gud-running)
 		  :visible (memq gud-minor-mode
-				 '(gdbmi gdb dbx xdb jdb pdb)))
+				 '(gdbmi gdb guiler dbx xdb jdb pdb)))
     ([pp]	menu-item "Print S-expression" gud-pp
                   :enable (and (not gud-running)
 				  (bound-and-true-p gdb-active-process))
@@ -195,7 +196,7 @@
     ([finish]	menu-item "Finish Function" gud-finish
                   :enable (not gud-running)
 		  :visible (memq gud-minor-mode
-				 '(gdbmi gdb xdb jdb pdb)))
+				 '(gdbmi gdb guiler xdb jdb pdb)))
     ([stepi]	menu-item "Step Instruction" gud-stepi
                   :enable (not gud-running)
 		  :visible (memq gud-minor-mode '(gdbmi gdb dbx)))
@@ -1704,6 +1705,83 @@
   (run-hooks 'pdb-mode-hook))
 \f
 ;; ======================================================================
+;; Guile REPL (guiler) functions
+
+;; History of argument lists passed to guiler.
+(defvar gud-guiler-history nil)
+
+(defvar gud-guiler-lastfile nil)
+
+(defun gud-guiler-marker-filter (string)
+  (setq gud-marker-acc (if gud-marker-acc (concat gud-marker-acc string) string))
+
+  (let ((start 0))
+    (while
+	(cond
+	 ((string-match "^In \\(.*\\):" gud-marker-acc start)
+          (setq gud-guiler-lastfile (match-string 1 gud-marker-acc)))
+	 ((string-match "^\\([^:\n]+\\):\\([0-9]+\\):\\([0-9]+\\):[^\n]*"
+			gud-marker-acc start)
+          (setq gud-guiler-lastfile (match-string 1 gud-marker-acc))
+          (setq gud-last-frame
+                (cons gud-guiler-lastfile
+                      (string-to-number (match-string 2 gud-marker-acc)))))
+	 ((string-match "^[ ]*\\([0-9]+\\):\\([0-9]+\\)  [^\n]*"
+			gud-marker-acc start)
+          (if gud-guiler-lastfile
+              (setq gud-last-frame
+                    (cons gud-guiler-lastfile
+                          (string-to-number (match-string 1 gud-marker-acc))))))
+	 ((string-match comint-prompt-regexp gud-marker-acc start) t)
+         ((string= (substring gud-marker-acc start) "") nil)
+         (t nil))
+      (setq start (match-end 0)))
+
+    ;; Search for the last incomplete line in this chunk
+    (while (string-match "\n" gud-marker-acc start)
+      (setq start (match-end 0)))
+
+    ;; If we have an incomplete line, store it in gud-marker-acc.
+    (setq gud-marker-acc (substring gud-marker-acc (or start 0))))
+  string)
+
+
+(defcustom gud-guiler-command-name "guile"
+  "File name for executing the Guile debugger.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'gud)
+
+;;;###autoload
+(defun guiler (command-line)
+  "Run guiler on program FILE in buffer `*gud-FILE*'.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger."
+  (interactive
+   (list (gud-query-cmdline 'guiler)))
+
+  (gud-common-init command-line nil 'gud-guiler-marker-filter)
+  (setq-local gud-minor-mode 'guiler)
+
+;; FIXME: absolute file-names are not grokked yet by Guile's ,break-at-source
+;; and relative file names only when relative to %load-path.
+;;  (gud-def gud-break  ",break-at-source %d%f %l"  "\C-b" "Set breakpoint at current line.")
+  (gud-def gud-break  ",break-at-source %f %l"  "\C-b" "Set breakpoint at current line.")
+;; FIXME: remove breakpoint with file-line not yet supported by Guile
+;;  (gud-def gud-remove ",delete ---> %d%f:%l"  "\C-d" "Remove breakpoint at current line")
+  (gud-def gud-step   ",step"         "\C-s" "Step one source line with display.")
+  (gud-def gud-next   ",next"         "\C-n" "Step one line (skip functions).")
+;;  (gud-def gud-cont   "continue"     "\C-r" "Continue with display.")
+  (gud-def gud-finish ",finish"       "\C-f" "Finish executing current function.")
+  (gud-def gud-up     ",up"           "<" "Up one stack frame.")
+  (gud-def gud-down   ",down"         ">" "Down one stack frame.")
+  (gud-def gud-print  "%e"            "\C-p" "Evaluate Guile expression at point.")
+
+  (setq comint-prompt-regexp "^scheme@([^>]+> ")
+  (setq paragraph-start comint-prompt-regexp)
+  (run-hooks 'guiler-mode-hook))
+\f
+;; ======================================================================
 ;;
 ;; JDB support.
 ;;
@@ -3450,6 +3528,7 @@
   "Return a suitable command to print the expression EXPR."
   (pcase gud-minor-mode
     (`gdbmi (concat "-data-evaluate-expression \"" expr "\""))
+    (`guiler expr)
     (`dbx (concat "print " expr))
     ((or `xdb `pdb) (concat "p " expr))
     (`sdb (concat expr "/"))))

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWdjgvvgAABJfgAAQQGFxUBIA
AACv794QIABkRTaajamQyGjTaRiFGgBMBBkwQhDmaVnH5r9hMFQyJ7EUzThiw4Ixc/mQVpexbPS2
9yLLTxaFbWvXcN2zcydOQxpD652acQC4g4Z96jI5BipgKAAiM5Zz45Kd/4u5IpwoSGxwX3wA

[-- Attachment #5: 2-Support-Guile-backtraces-in-compilation-mode.bundle --]
[-- Type: application/octet-stream, Size: 4214 bytes --]

# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: janneke@gnu.org-20140810120016-c3mkc9qisvtdurv0
# target_branch: /home/janneke/vc/emacs.bzr/trunk
# testament_sha1: f9a6d6dd92e94a89b3eb96b57ba882b90fda06a3
# timestamp: 2014-08-10 14:02:02 +0200
# base_revision_id: janneke@gnu.org-20140810120016-hh49ftaf2xvkqio2
# 
# Begin patch
=== modified file 'etc/ChangeLog'
--- etc/ChangeLog	2014-08-09 16:12:33 +0000
+++ etc/ChangeLog	2014-08-10 12:00:16 +0000
@@ -1,3 +1,7 @@
+2014-08-08  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+	* compilation.txt (file): Add Guile backtrace example.
+
 2014-08-09  Reuben Thomas  <rrt@sc3d.org>
 
 	* PROBLEMS: Remove msdos/is_exec.c and sigaction.c.

=== modified file 'etc/compilation.txt'
--- etc/compilation.txt	2014-01-01 07:43:34 +0000
+++ etc/compilation.txt	2014-08-10 12:00:16 +0000
@@ -261,6 +261,26 @@
 {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

=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2014-08-10 12:00:16 +0000
+++ lisp/ChangeLog	2014-08-10 12:00:16 +0000
@@ -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;

=== modified file 'lisp/progmodes/compile.el'
--- lisp/progmodes/compile.el	2014-05-29 03:45:29 +0000
+++ lisp/progmodes/compile.el	2014-08-10 12:00:16 +0000
@@ -477,6 +477,8 @@
      ;;
      "^\\([^ \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'.")
 

=== modified file 'test/ChangeLog'
--- test/ChangeLog	2014-08-07 00:07:32 +0000
+++ test/ChangeLog	2014-08-10 12:00:16 +0000
@@ -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-07  Glenn Morris  <rgm@gnu.org>
 
 	* automated/Makefile.in (check-tar): Remove, hydra recipe does it now.

=== modified file 'test/automated/compile-tests.el'
--- test/automated/compile-tests.el	2014-01-01 07:43:34 +0000
+++ test/automated/compile-tests.el	2014-08-10 12:00:16 +0000
@@ -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 @@
 	    (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))

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWdjgvvgAABJfgAAQQGFxUBIA
AACv794QIABkRTaajamQyGjTaRiFGgBMBBkwQhDmaVnH5r9hMFQyJ7EUzThiw4Ixc/mQVpexbPS2
9yLLTxaFbWvXcN2zcydOQxpD652acQC4g4Z96jI5BipgKAAiM5Zz45Kd/4u5IpwoSGxwX3wA

[-- Attachment #6: Type: text/plain, Size: 156 bytes --]



-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

                 reply	other threads:[~2014-08-10 12:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fvh4341d.fsf@drakenvlieg.flower \
    --to=janneke@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).