mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 09:31:39 -05:00
Fix breadcrumbs in notebook list.
Seems like a regression, but I'm not 100% sure on that. Update metadata name (add ein qualifier) per Jupyter documentation guidance.
This commit is contained in:
parent
65d30acd1c
commit
3aa290ed91
2 changed files with 7 additions and 8 deletions
|
@ -1020,7 +1020,8 @@ prettified text thus be used instead of HTML type."
|
|||
|
||||
(defmethod ein:cell-to-nb4-json ((cell ein:codecell) wsidx &optional discard-output)
|
||||
(let ((metadata `((collapsed . ,(if (oref cell :collapsed) t json-false))
|
||||
(tags . (,(format "worksheet-%s" wsidx)))))
|
||||
(autoscroll . json-false)
|
||||
(ein.tags . (,(format "worksheet-%s" wsidx)))))
|
||||
(outputs (if discard-output []
|
||||
(oref cell :outputs)))
|
||||
(renamed-outputs '())
|
||||
|
@ -1090,15 +1091,13 @@ prettified text thus be used instead of HTML type."
|
|||
(defmethod ein:cell-to-nb4-json ((cell ein:textcell) wsidx &optional discard-output)
|
||||
`((cell_type . ,(oref cell :cell-type))
|
||||
(source . ,(ein:cell-get-text cell))
|
||||
(metadata . ((collapsed . t)
|
||||
(tags . (,(format "worksheet-%s" wsidx)))))))
|
||||
(metadata . ((ein.tags . (,(format "worksheet-%s" wsidx)))))))
|
||||
|
||||
(defmethod ein:cell-to-nb4-json ((cell ein:headingcell) wsidx &optional discard-output)
|
||||
(let ((header (make-string (oref cell :level) ?#)))
|
||||
`((cell_type . "markdown")
|
||||
(source . ,(format "%s %s" header (ein:cell-get-text cell)))
|
||||
(metadata . ((collapsed . t)
|
||||
(tags . (,(format "worksheet-%s" wsidx))))))))
|
||||
(metadata . ((ein.tags . (,(format "worksheet-%s" wsidx))))))))
|
||||
|
||||
(defmethod ein:cell-to-json ((cell ein:headingcell) &optional discard-output)
|
||||
(let ((json (call-next-method)))
|
||||
|
|
|
@ -353,7 +353,7 @@ You may find the new one in the notebook list." error)
|
|||
(current-path "/")
|
||||
(pairs (list (cons "Home" ""))))
|
||||
(dolist (p paths pairs)
|
||||
(setf current-path (concat current-path p)
|
||||
(setf current-path (concat current-path "/" p)
|
||||
pairs (append pairs (list (cons p current-path)))))))
|
||||
|
||||
(defun ein:notebooklist-render ()
|
||||
|
@ -374,8 +374,8 @@ Notebook list data is passed via the buffer local variable
|
|||
(widget-create
|
||||
'link
|
||||
:notify (lambda (&rest ignore) (ein:notebooklist-open
|
||||
(ein:$notebooklist-url-or-port ein:%notebooklist%)
|
||||
path))
|
||||
(ein:$notebooklist-url-or-port ein:%notebooklist%)
|
||||
path))
|
||||
name)))
|
||||
(widget-insert " |\n\n"))
|
||||
(widget-create
|
||||
|
|
Loading…
Add table
Reference in a new issue