mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 09:31:39 -05:00
Refactor ein:notebook-open
This commit is contained in:
parent
005ea17204
commit
0c212e5485
1 changed files with 6 additions and 5 deletions
|
@ -90,12 +90,13 @@ Note that SLOT should not be quoted."
|
||||||
|
|
||||||
(defun ein:notebook-open (notebook-id)
|
(defun ein:notebook-open (notebook-id)
|
||||||
(let ((url (ein:notebook-url notebook-id)))
|
(let ((url (ein:notebook-url notebook-id)))
|
||||||
(lexical-let ((notebook-id notebook-id))
|
(url-retrieve url
|
||||||
(url-retrieve
|
#'ein:notebook-url-retrieve-callback
|
||||||
url
|
(list notebook-id))))
|
||||||
(lambda (s) (ein:notebook-pop-buffer notebook-id))))))
|
|
||||||
|
|
||||||
(defun ein:notebook-pop-buffer (notebook-id)
|
(defun ein:notebook-url-retrieve-callback (status notebook-id)
|
||||||
|
(ein:log 'debug "URL-RETRIEVE nodtebook-id = %S, status = %S"
|
||||||
|
notebook-id status)
|
||||||
(let ((data (ein:json-read)))
|
(let ((data (ein:json-read)))
|
||||||
(kill-buffer (current-buffer))
|
(kill-buffer (current-buffer))
|
||||||
(with-current-buffer
|
(with-current-buffer
|
||||||
|
|
Loading…
Add table
Reference in a new issue