mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-05 09:01:40 -05:00
Make ein:shared-output-get-or-create more robust
This commit is contained in:
parent
01930305bd
commit
97cd150f3b
1 changed files with 8 additions and 1 deletions
|
@ -74,8 +74,15 @@
|
|||
"Get the shared output buffer."
|
||||
(get-buffer-create ein:shared-output-buffer-name))
|
||||
|
||||
(defun ein:shared-output-buffer ()
|
||||
(ewoc-buffer (oref ein:@shared-output :ewoc)))
|
||||
|
||||
(defun ein:shared-output-healthy-p ()
|
||||
(and (ein:$shared-output-p ein:@shared-output)
|
||||
(buffer-live-p (ein:shared-output-buffer))))
|
||||
|
||||
(defun ein:shared-output-get-or-create ()
|
||||
(if ein:@shared-output
|
||||
(if (ein:shared-output-healthy-p)
|
||||
ein:@shared-output
|
||||
(with-current-buffer (ein:shared-output-get-buffer)
|
||||
;; FIXME: This is a duplication of `ein:notebook-from-json'.
|
||||
|
|
Loading…
Add table
Reference in a new issue