Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions jupyter-kernelspec.el
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,17 @@ REFRESH."
(or (and (not refresh) (gethash host jupyter--kernelspecs))
(let ((specs
(plist-get
(let ((json (or (jupyter-command "kernelspec" "list"
(let* ((json-result (or (jupyter-command "kernelspec" "list"
"--json" "--log-level" "ERROR")
(error "\
Can't obtain kernelspecs from jupyter shell command"))))
Can't obtain kernelspecs from jupyter shell command")))
(_ (string-match "{\\(.\\|\n\\)*}" json-result))
(json-start (car (match-data)))
(json-end (cadr (match-data)))
(json (substring json-result json-start json-end)))
(when (> json-start 0)
(warn "Getting kernelspec has warning(s):"
(substring json-result 0 json-start)))
(condition-case nil
(jupyter-read-plist-from-string json)
(error
Expand Down