Merge branch 'master' of github.com:millejoh/emacs-ipython-notebook

This commit is contained in:
John Miller 2018-08-25 13:26:11 -05:00
commit 1110649244

View file

@ -90,7 +90,7 @@
:msg_id (ein:utils-uuid)
:username (ein:$kernel-username kernel)
:session (ein:$kernel-session-id kernel)
;; version?
:version "5.0"
:date (format-time-string "%Y-%m-%dT%T" (current-time)) ; ISO 8601 timestamp
:msg_type msg-type)
:metadata (make-hash-table)
@ -444,9 +444,10 @@ http://ipython.org/ipython-doc/dev/development/messaging.html#object-information
(defun* ein:kernel-execute (kernel code &optional callbacks
&key
(silent t)
(user-variables [])
(store-history t)
(user-expressions (make-hash-table))
(allow-stdin t))
(allow-stdin t)
(stop-on-error nil))
"Execute CODE on KERNEL.
When calling this method pass a CALLBACKS structure of the form:
@ -511,9 +512,10 @@ Sample implementations
(let* ((content (list
:code code
:silent (or silent json-false)
:user_variables user-variables
:store_history (or store-history json-false)
:user_expressions user-expressions
:allow_stdin allow-stdin))
:allow_stdin allow-stdin
:stop_on_error (or stop-on-error json-false)))
(msg (ein:kernel--get-msg kernel "execute_request" content))
(msg-id (plist-get (plist-get msg :header) :msg_id)))
(run-hook-with-args 'ein:pre-kernel-execute-functions msg)
@ -547,10 +549,14 @@ CONTENT and METADATA are given by `complete_reply' message.
http://ipython.org/ipython-doc/dev/development/messaging.html#complete
"
(assert (ein:kernel-live-p kernel) nil "complete_reply: Kernel is not active.")
(let* ((content (list
;; :text ""
:line line
:cursor_pos cursor-pos))
(let* ((content (if (< (ein:$kernel-api-version kernel) 5)
(list
;; :text ""
:line line
:cursor_pos cursor-pos)
(list
:code line
:cursor_pos cursor-pos)))
(msg (ein:kernel--get-msg kernel "complete_request" content))
(msg-id (plist-get (plist-get msg :header) :msg_id)))
(ein:websocket-send-shell-channel kernel msg)