>>>>> "Paul" == Paul Kinnucan <[EMAIL PROTECTED]> writes:

  Paul> Charles Sutton writes:
  >> Hi,
  >>
  >> If an application I'm running prints out the stack trace of an
  >> exception, is there a command that will parse the stack track
  >> trace output and bring up the relevant source line in a buffer
  >> (similar to what's done with compile errors)?  If not, I might
  >> take a look at it.

  Paul> Click mouse button 2 over the stack trace line you want to
  Paul> visit or enter one of the following commands:

  Paul> jde-run-etrace-next jde-run-etrace-prev
  Paul> jde-run-etrace-show-at-point

As Paul says etrace does the job. 

I augment it with this code which defines a minor mode, for switching
the keybindings on and off. This is useful for log files for instance,
where you also want Emacs to understand stack traces.


(defvar jde-run-etrace-mode-map (make-sparse-keymap))

(define-key  jde-run-etrace-mode-map "\C-c\C-v\C-[" 'jde-run-etrace-prev)
(define-key  jde-run-etrace-mode-map "\C-c\C-v\C-]" 'jde-run-etrace-next)
(define-key  jde-run-etrace-mode-map [mouse-2] 'jde-run-etrace-show-at-mouse)


(easy-mmode-define-minor-mode jde-etrace-mode
                              "Jump to stack trace"
                              nil " etrace" jde-run-etrace-mode-map)


Phil

Reply via email to