emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: George Mauer <gmauer@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: How to supply multiples of a custom src block header arg
Date: Sun, 31 May 2020 08:36:53 -0500	[thread overview]
Message-ID: <CA+pajWLaatyTisyzq+utWj5atpOB1cNvXV6rNQQ5AocMY__kMA@mail.gmail.com> (raw)

[-- 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)

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 .

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 --]

                 reply	other threads:[~2020-05-31 13:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+pajWLaatyTisyzq+utWj5atpOB1cNvXV6rNQQ5AocMY__kMA@mail.gmail.com \
    --to=gmauer@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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).