emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to supply multiples of a custom src block header arg
@ 2020-05-31 13:36 George Mauer
  0 siblings, 0 replies; only message in thread
From: George Mauer @ 2020-05-31 13:36 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1276 bytes --]

It would seem that `:var` in src blocks gets special treatment.

I am hacking on ob-racket trying to add the ability to require from a
header (the `:results value` mode wraps everything in a `let` so you need
something special to put requires at the top level).

I do this

```
#+begin_src racket :require rebellion/collection/list :require
rebellion/streaming/transducer :var foo=1 :var bar=2
  (transduce (in-range 1 10)
             (folding + 0)
             #:into into-list)
#+end_src
```

Note there’s two `:var` headers and two custom `:require` headers

Yet when in my `org-babel-execute:racket` function I log `params`

```
(defun org-babel-execute:racket (body params)
  "Executes a Racket code block."
  (message "==params %s" params)
  ...
```

I get

```
==params ((:var foo . 1) (:var bar . 2) (:colname-names) (:rowname-names)
(:result-params replace) (:result-type . value) (:results . replace)
(:exports . code) (:session . none) (:cache . no) (:noweb . no) (:hlines .
no) (:tangle . no) (:lang . racket) (:require .
rebellion/streaming/transducer))
```

Note that both `:var` headers have corresponding cons cells but only the
last `:require` header does

What is causing this behavior and how would I modify it?

[-- Attachment #2: Type: text/html, Size: 1762 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-31 13:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-31 13:36 How to supply multiples of a custom src block header arg George Mauer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).