diff --git a/jupyter-org-client.el b/jupyter-org-client.el index b261d2eb..e78c76cd 100644 --- a/jupyter-org-client.el +++ b/jupyter-org-client.el @@ -618,11 +618,11 @@ source block, return non-nil. Otherwise, when `point' is not inside a Jupyter src-block, return nil." (unless jupyter-org--src-block-cache (setq jupyter-org--src-block-cache - (list (list 'invalid nil (make-marker) - (let ((end (make-marker))) - ;; Move the end marker when text is inserted - (set-marker-insertion-type end t) - end))))) + (list 'invalid nil (make-marker) + (let ((end (make-marker))) + ;; Move the end marker when text is inserted + (set-marker-insertion-type end t) + end)))) (if (org-in-src-block-p 'inside) (or (jupyter-org--at-cached-src-block-p) (when-let* ((el (org-element-at-point)) diff --git a/test/jupyter-test.el b/test/jupyter-test.el index 99432f96..b1072727 100644 --- a/test/jupyter-test.el +++ b/test/jupyter-test.el @@ -2170,10 +2170,10 @@ Image(filename='%s', width=300)" file) (forward-line) (end-of-line) (should-not jupyter-org--src-block-cache) - (should-not (jupyter-org--same-src-block-p)) - (jupyter-org--set-current-src-block) + (should-not (jupyter-org--at-cached-src-block-p)) + (jupyter-org--set-src-block-cache) (should jupyter-org--src-block-cache) - (should (jupyter-org--same-src-block-p)) + (should (jupyter-org--at-cached-src-block-p)) (cl-destructuring-bind (params beg end) jupyter-org--src-block-cache (should (equal (alist-get :session params) jupyter-org-test-session))