On Wednesday, 29 December 2021 15.03.47 -03 Felipe Lema wrote: > Sup, y'all > > The geiser package had a recent update in which `geiser-eval-region` behaves > like an async function and does not return evaluation result. In exchange, > the newly introduced `geiser-eval-region/wait` does that now. > > I've attached a patch to update ob-scheme.el to reflect these changes. > Without them, evaluating scheme dialect code blocks in Org will end up with > empty results. > > To learn more about the change (and how it impacted other people's flows) see > issue thread below > > https://gitlab.com/emacs-geiser/geiser/-/issues/30 > > Felipe > >
I was pointed out that I was missing the corresponding `declare-function`. I've included it in the attached patch. Sorry about the double-posting Felipe
update to new API call to evaluate region and wait for result * ob-scheme.el replace `geiser-eval-region` with `geiser-eval-region/wait` as the former changed expected behaviour; the latter returns the result of evaluating. diff --git a/lisp/org/ob-scheme.el b/lisp/org/ob-scheme.el index f4836b23fe..bcceba1258 100644 --- a/lisp/org/ob-scheme.el +++ b/lisp/org/ob-scheme.el @@ -53,8 +53,8 @@ geiser-repl-window-allow-split (declare-function run-geiser "ext:geiser-repl" (impl)) (declare-function geiser-mode "ext:geiser-mode" ()) -(declare-function geiser-eval-region "ext:geiser-mode" - (start end &optional and-go raw nomsg)) +(declare-function geiser-eval-region/wait "ext:geiser-mode" + (start end &optional timeout)) (declare-function geiser-repl-exit "ext:geiser-repl" (&optional arg)) (declare-function geiser-eval--retort-output "ext:geiser-eval" (ret)) (declare-function geiser-eval--retort-result-str "ext:geiser-eval" (ret prefix)) @@ -176,7 +176,7 @@ org-babel-scheme-execute-with-geiser (setq geiser-impl--implementation nil) (let ((geiser-debug-jump-to-debug-p nil) (geiser-debug-show-debug-p nil)) - (let ((ret (geiser-eval-region (point-min) (point-max)))) + (let ((ret (geiser-eval-region/wait (point-min) (point-max)))) (setq result (if output (or (geiser-eval--retort-output ret) "Geiser Interpreter produced no output")