[slime-devel] compiler note buffers

Helmut Eller e9626484 at stud3.tuwien.ac.at
Tue Apr 20 21:55:12 UTC 2004


Zach Beane <xach at xach.com> writes:

> What should I do? I tried using a typeout frame, but it doesn't look
> like the compiler notes tree uses it.

We could try to insert the notes tree in the output buffer.  Here's a
hackish way to achieve that:

(setq 
 slime-compilation-finished-hook
 (defun slime-insert-errors-in-output-buffer (&optional notes)
   (interactive)
   (let ((notes (or notes (slime-compiler-notes))))
     (with-current-buffer (slime-output-buffer)
       (slime-with-output-end-mark
	(let ((start (point))) 
	  (insert "\n")
	  (when (null notes)
	    (insert "[no notes]"))
	  (dolist (tree (slime-compiler-notes-to-tree notes))
	    (slime-tree-insert tree "")
	    (insert "\n"))
	  (insert "\n")
	  (let ((overlay (make-overlay start (point)))
		(local-map (make-sparse-keymap)))
	    (define-key local-map (kbd "RET") 
	      'slime-compiler-notes-show-details)
	    (overlay-put overlay 'local-map local-map))))))))

This is only marginally tested, but should be good enough to
demonstrate the idea.  Do you like this better?

Helmut.




More information about the slime-devel mailing list