mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 07:41:37 -05:00
Only display graphic mimetypes when a graphic display is available
This commit is contained in:
parent
f445e6d951
commit
8f3d6132a0
1 changed files with 7 additions and 2 deletions
|
@ -410,8 +410,13 @@ image."
|
|||
(jupyter-repl-insert text))
|
||||
|
||||
(defun jupyter-repl-insert-data (data)
|
||||
(let ((mimetypes (cl-loop for (k d) on data by #'cddr
|
||||
when (and d (not (equal d ""))) collect k)))
|
||||
(let ((mimetypes (cl-loop
|
||||
with graphic-types = '(:image/png :image/svg+xml :text/latex)
|
||||
for (k d) on data by #'cddr
|
||||
when (and d (not (equal d ""))
|
||||
(or (display-graphic-p)
|
||||
(not (memq k graphics-types))))
|
||||
collect k)))
|
||||
(cond
|
||||
((memq :image/png mimetypes)
|
||||
(insert-image
|
||||
|
|
Loading…
Add table
Reference in a new issue