mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 23:41:38 -05:00
Use jupyter-inhibit-handlers
This commit is contained in:
parent
4a0cff991d
commit
09ef799535
1 changed files with 6 additions and 6 deletions
|
@ -1449,15 +1449,15 @@ displayed without anything showing up in the REPL buffer."
|
||||||
(unless (= (save-excursion (jupyter-repl-previous-cell)) 0)
|
(unless (= (save-excursion (jupyter-repl-previous-cell)) 0)
|
||||||
(jupyter-repl-insert-prompt 'in))
|
(jupyter-repl-insert-prompt 'in))
|
||||||
(setq str (string-trim str))
|
(setq str (string-trim str))
|
||||||
(let* ((code (if silently (string-trim str)
|
(let* ((jupyter-inhibit-handlers silently)
|
||||||
(prog1 nil
|
|
||||||
(jupyter-repl-replace-cell-code str))))
|
|
||||||
(req (jupyter-execute-request jupyter-repl-current-client
|
(req (jupyter-execute-request jupyter-repl-current-client
|
||||||
:code code)))
|
:code (if silently (string-trim str)
|
||||||
(setf (jupyter-request-run-handlers-p req) (not silently))
|
(prog1 nil
|
||||||
|
(jupyter-repl-replace-cell-code str))))))
|
||||||
(jupyter-add-callback req
|
(jupyter-add-callback req
|
||||||
:execute-reply (lambda (msg)
|
:execute-reply (lambda (msg)
|
||||||
(cl-destructuring-bind (&key status ename evalue &allow-other-keys)
|
(cl-destructuring-bind (&key status ename evalue
|
||||||
|
&allow-other-keys)
|
||||||
(jupyter-message-content msg)
|
(jupyter-message-content msg)
|
||||||
(unless (equal status "ok")
|
(unless (equal status "ok")
|
||||||
(message "jupyter (%s): %s" ename
|
(message "jupyter (%s): %s" ename
|
||||||
|
|
Loading…
Add table
Reference in a new issue