Function: hib-python-traceback
hib-python-traceback is a byte-compiled function defined in
hibtypes.el.
Signature
(hib-python-traceback)
Documentation
Test for and jump to line referenced in Python pdb, traceback, or pytype error.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hibtypes.el
;;; ========================================================================
;;; Jumps to source line associated with debugger stack frame or breakpoint
;;; lines. Supports pdb, gdb, dbx, and xdb.
;;; ========================================================================
(defun hib-python-traceback ()
"Test for and jump to line referenced in Python pdb, traceback, or pytype error."
(when (or (looking-at "\\(^\\|.+ \\)File \"\\([^\"\t\f\n\r]+\\S-\\)\", line \\([0-9]+\\)")
(looking-at ">?\\(\\s-+\\)\\([^\"()\t\f\n\r]+\\S-\\)(\\([0-9]+\\))\\S-"))
(let* ((file (match-string-no-properties 2))
(line-num (match-string-no-properties 3))
(but-label (concat file ":" line-num)))
(setq line-num (string-to-number line-num))
(ibut:label-set but-label
(line-beginning-position) (line-end-position))
(hact 'link-to-file-line file line-num))))