From 830095e367b439da908d489314e43fe60afdbb02 Mon Sep 17 00:00:00 2001 From: Trevor Murphy Date: Wed, 3 Sep 2025 15:12:30 -0700 Subject: [PATCH 1/2] Fixup for `Refactor source block caching` f2092cc renamed these methods but missed their use in this test. --- test/jupyter-test.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)) From 1c7c507d9b1544837fe3bafc2a314f49676a5a76 Mon Sep 17 00:00:00 2001 From: Trevor Murphy Date: Wed, 3 Sep 2025 13:54:00 -0700 Subject: [PATCH 2/2] Fix source block caching. The extra `list` is inconsistent with the expected cache structure. The rest of this function assumes a single-depth list. --- jupyter-org-client.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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))