From 88f62000af14cf5bb6b03e8a64f2121b1678a58e Mon Sep 17 00:00:00 2001 From: dalanicolai Date: Sat, 28 Jun 2025 12:49:18 +0200 Subject: [PATCH] Fix: set org src block cache (fix autocomplete) The completion-at-point functionality is broken because the org src-block-cache is set to a nested list, instead of just a list. Therefore, the pcase-let destructuring in the jupyter-org--src-block-cache does not work correctly, and fails to bind the cached markers. 'Unnesting' the cache-list fixes the set-cache and completion functionality. --- 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))