@@ -980,26 +980,27 @@ If the source block parameters have a value for the :display
980
980
header argument, like \" image/png html plain\" , then loop over
981
981
those mime types instead."
982
982
(cl-assert plist json-plist)
983
- (let* ((params (jupyter-org-request-block-params req))
984
- (display-mime-types (jupyter-org--find-mime-types
985
- (alist-get :display params))))
986
- ; ; Push :file back into PARAMS if it was present in
987
- ; ; `org-babel-execute:jupyter' . That function removes it because
988
- ; ; we don't want `org-babel-insert-result' to handle it.
989
- (when (jupyter-org-request-file req)
990
- (push (cons :file (jupyter-org-request-file req)) params))
991
- (cond
992
- ((jupyter-map-mime-bundle (or display-mime-types jupyter-org-mime-types)
993
- (jupyter-normalize-data plist metadata)
994
- (lambda (mime content )
995
- (jupyter-org-result mime content params))))
996
- (t
997
- (let ((warning
998
- (format
999
- " %s did not return requested mimetype(s): %s"
1000
- (jupyter-message-type (jupyter-request-last-message req))
1001
- (or display-mime-types jupyter-org-mime-types))))
1002
- (display-warning 'jupyter warning ))))))
983
+ (org-with-point-at (jupyter-org-request-marker req)
984
+ (let* ((params (jupyter-org-request-block-params req))
985
+ (display-mime-types (jupyter-org--find-mime-types
986
+ (alist-get :display params))))
987
+ ; ; Push :file back into PARAMS if it was present in
988
+ ; ; `org-babel-execute:jupyter' . That function removes it because
989
+ ; ; we don't want `org-babel-insert-result' to handle it.
990
+ (when (jupyter-org-request-file req)
991
+ (push (cons :file (jupyter-org-request-file req)) params))
992
+ (cond
993
+ ((jupyter-map-mime-bundle (or display-mime-types jupyter-org-mime-types)
994
+ (jupyter-normalize-data plist metadata)
995
+ (lambda (mime content )
996
+ (jupyter-org-result mime content params))))
997
+ (t
998
+ (let ((warning
999
+ (format
1000
+ " %s did not return requested mimetype(s): %s"
1001
+ (jupyter-message-type (jupyter-request-last-message req))
1002
+ (or display-mime-types jupyter-org-mime-types))))
1003
+ (display-warning 'jupyter warning )))))))
1003
1004
1004
1005
(cl-defmethod jupyter-org-result ((_mime (eql :application/vnd .jupyter.widget-view+json)) _content _params)
1005
1006
; ; TODO: Clickable text to open up a browser
0 commit comments