emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-babel guile source block bug in handling multiple values


From: Ihor Radchenko
Subject: Re: org-babel guile source block bug in handling multiple values
Date: Tue, 07 Mar 2023 14:36:25 +0000

Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> writes:

> * Multiple values involving =:var= variables
>
> #+begin_src scheme :eval query-export :results output replace drawer :var x=1 
> :var y=2
> (import (except (rnrs base) error vector-map)
>          (only (guile)
>                lambda*
>                λ)
>          ;; let-values
>          (srfi srfi-11))
>
> (let-values ([(a b) (values x y)])
>    (simple-format #t "~a ~a\n" a b))
> #+end_src
>
> #+RESULTS:
> :results:
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> Unbound variable: a
>
> Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
> scheme@(guile-user) [1]>
> :end:

I am not familiar with scheme, but AFAIK all ob-scheme does is wrapping
the code block into (let (...) ,@body) See `org-babel-expand-body:scheme'.

May the problem be with your let-values form? 

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]