mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 07:41:37 -05:00
parent
49275c37b8
commit
a5e584e498
1 changed files with 13 additions and 6 deletions
|
@ -768,14 +768,21 @@ PASSWORD is t, then `read-passwd' is used to get input from the
|
||||||
user. Otherwise `read-from-minibuffer' is used."
|
user. Otherwise `read-from-minibuffer' is used."
|
||||||
(declare (indent 1))
|
(declare (indent 1))
|
||||||
(let* ((value (condition-case nil
|
(let* ((value (condition-case nil
|
||||||
|
;; Disallow any `with-timeout's from timing out. This
|
||||||
|
;; prevents any calls to `jupyter-wait-until-received' from
|
||||||
|
;; timing out when reading input. See #35.
|
||||||
|
(let ((timeout-spec (with-timeout-suspend)))
|
||||||
|
(unwind-protect
|
||||||
(if (eq password t) (read-passwd prompt)
|
(if (eq password t) (read-passwd prompt)
|
||||||
(read-from-minibuffer prompt))
|
(read-from-minibuffer prompt))
|
||||||
|
(with-timeout-unsuspend timeout-spec)))
|
||||||
(quit "")))
|
(quit "")))
|
||||||
(msg (jupyter-message-input-reply :value value)))
|
(msg (jupyter-message-input-reply :value value)))
|
||||||
|
(unwind-protect
|
||||||
(jupyter-send client :stdin :input-reply msg)
|
(jupyter-send client :stdin :input-reply msg)
|
||||||
(if (eq password t)
|
(when (eq password t)
|
||||||
(progn (clear-string value) "")
|
(clear-string value)))
|
||||||
value)))
|
value))
|
||||||
|
|
||||||
(defalias 'jupyter-handle-input-reply 'jupyter-handle-input-request)
|
(defalias 'jupyter-handle-input-reply 'jupyter-handle-input-request)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue