mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 01:21:38 -05:00
Properly encode notebook paths
This should fix an obscure (well, at least no one has created an issue for this yet) failure trying to open a notebook path that contains characters like (, or ), etc. that need to be escaped in the REST API call.
This commit is contained in:
parent
ec9eefb83c
commit
aaee6d0348
2 changed files with 248 additions and 2 deletions
246
.ipynb_checkpoints/Demo-checkpoint.ipynb
Normal file
246
.ipynb_checkpoints/Demo-checkpoint.ipynb
Normal file
File diff suppressed because one or more lines are too long
|
@ -99,13 +99,13 @@ global setting. For global setting and more information, see
|
||||||
(defun ein:content-url (content)
|
(defun ein:content-url (content)
|
||||||
(let ((url-or-port (ein:$content-url-or-port content))
|
(let ((url-or-port (ein:$content-url-or-port content))
|
||||||
(path (ein:$content-path content)))
|
(path (ein:$content-path content)))
|
||||||
(ein:url url-or-port "api/contents" path)))
|
(ein:url url-or-port "api/contents" (url-hexify-string path))))
|
||||||
|
|
||||||
(defun ein:content-url-legacy (content)
|
(defun ein:content-url-legacy (content)
|
||||||
"Generate content url's for IPython Notebook version 2.x"
|
"Generate content url's for IPython Notebook version 2.x"
|
||||||
(let ((url-or-port (ein:$content-url-or-port content))
|
(let ((url-or-port (ein:$content-url-or-port content))
|
||||||
(path (ein:$content-path content)))
|
(path (ein:$content-path content)))
|
||||||
(ein:url url-or-port "api/notebooks" path)))
|
(ein:url url-or-port "api/notebooks" (url-hexify-string path))))
|
||||||
|
|
||||||
(defun ein:content-query-contents (path &optional url-or-port force-sync callback)
|
(defun ein:content-query-contents (path &optional url-or-port force-sync callback)
|
||||||
"Return the contents of the object at the specified path from the Jupyter server."
|
"Return the contents of the object at the specified path from the Jupyter server."
|
||||||
|
|
Loading…
Add table
Reference in a new issue