mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 07:41:37 -05:00
Pop up traceback buffer on errors when executing code blocks
This commit is contained in:
parent
892ab84148
commit
bbb677c573
2 changed files with 6 additions and 3 deletions
|
@ -1273,6 +1273,7 @@ Do this for the current cell."
|
|||
:comm-msg)
|
||||
(with-jupyter-repl-doc-buffer "traceback"
|
||||
(jupyter-repl-insert-ansi-coded-text traceback)
|
||||
(goto-char (line-beginning-position))
|
||||
(pop-to-buffer (current-buffer))))
|
||||
(t
|
||||
(jupyter-repl-do-at-request client req
|
||||
|
|
|
@ -512,9 +512,11 @@ the PARAMS alist."
|
|||
;; HACK: Prevent insertion of a file when an error happens
|
||||
(let ((params (member "file" (alist-get :result-params params))))
|
||||
(and params (setcar params "scalar")))
|
||||
(if (eq result-type 'output)
|
||||
(funcall add-result (mapconcat #'ansi-color-apply traceback "\n"))
|
||||
(funcall add-result (format "%s: %s" ename (ansi-color-apply evalue)))))
|
||||
(setq traceback (mapconcat #'ansi-color-apply traceback "\n"))
|
||||
(with-jupyter-repl-doc-buffer "traceback"
|
||||
(jupyter-repl-insert-ansi-coded-text traceback)
|
||||
(pop-to-buffer (current-buffer)))
|
||||
(funcall add-result (format "%s: %s" ename (ansi-color-apply evalue))))
|
||||
(when async
|
||||
;; Run the hooks here instead of in the status message to prevent
|
||||
;; any delays
|
||||
|
|
Loading…
Add table
Reference in a new issue