Adapt to new kernel-execute API

This is required to avoid wrong-number-of-arguments error,
unlike javascript.
This commit is contained in:
Takafumi Arakaki 2012-08-08 21:30:14 +02:00
parent b799de0cbe
commit c798f7d143
4 changed files with 9 additions and 6 deletions

View file

@ -910,7 +910,8 @@ Called from ewoc pretty printer via `ein:cell-insert-output'."
:clear_output (cons #'ein:cell--handle-clear-output cell)
:set_next_input (cons #'ein:cell--handle-set-next-input cell)))
(defmethod ein:cell--handle-execute-reply ((cell ein:codecell) content)
(defmethod ein:cell--handle-execute-reply ((cell ein:codecell) content
-metadata-not-used-)
(ein:cell-set-input-prompt cell (plist-get content :execution_count))
(ein:cell-running-set cell nil)
(let ((events (oref cell :events)))
@ -931,7 +932,8 @@ Called from ewoc pretty printer via `ein:cell-insert-output'."
;; EWOC is connected in complicated way, I will leave them in
;; ein-cell.el.
(defmethod ein:cell--handle-output ((cell ein:codecell) msg-type content)
(defmethod ein:cell--handle-output ((cell ein:codecell) msg-type content
-metadata-not-used-)
(let* ((json (list :output_type msg-type)))
(ein:case-equal msg-type
(("stream")
@ -966,7 +968,8 @@ Called from ewoc pretty printer via `ein:cell-insert-output'."
json)
(defmethod ein:cell--handle-clear-output ((cell ein:codecell) content)
(defmethod ein:cell--handle-clear-output ((cell ein:codecell) content
-metadata-not-used-)
(ein:cell-clear-output cell
(plist-get content :stdout)
(plist-get content :stderr)

View file

@ -548,7 +548,7 @@ as a string and the rest of the argument is the optional ARGS."
(ein:kernel-execute
kernel
code
(list :output (cons (lambda (packed msg-type content)
(list :output (cons (lambda (packed msg-type content -metadata-not-used-)
(let ((func (car packed))
(args (cdr packed)))
(when (equal msg-type "stream")

View file

@ -108,7 +108,7 @@ If OTHER-WINDOW is non-`nil', open the file in the other window."
(list
:output
(cons
(lambda (packed msg-type content)
(lambda (packed msg-type content -metadata-not-used-)
(destructuring-bind (kernel object other-window notebook-buffer)
packed
(ein:case-equal msg-type

View file

@ -62,7 +62,7 @@
(ein:cell-execute-internal cell kernel code :silent nil))
(defmethod ein:cell--handle-output ((cell ein:shared-output-cell)
msg-type content)
msg-type content -metadata-not-used-)
(ein:log 'info "Got output '%s' in the shared buffer." msg-type)
(when (oref cell :popup)
(pop-to-buffer (ein:shared-output-create-buffer)))