From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8PnSEDKz017rfAAA0tVLHw (envelope-from ) for ; Sun, 31 May 2020 13:37:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id AJWuDDKz014PdAAAB5/wlQ (envelope-from ) for ; Sun, 31 May 2020 13:37:54 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C15E294029E for ; Sun, 31 May 2020 13:37:53 +0000 (UTC) Received: from localhost ([::1]:41106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfO9w-0002UQ-Ds for larch@yhetil.org; Sun, 31 May 2020 09:37:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfO9C-0002UJ-M2 for emacs-orgmode@gnu.org; Sun, 31 May 2020 09:37:06 -0400 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]:46873) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfO9B-0007cr-QI for emacs-orgmode@gnu.org; Sun, 31 May 2020 09:37:06 -0400 Received: by mail-ot1-x329.google.com with SMTP id g25so5780814otp.13 for ; Sun, 31 May 2020 06:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to; bh=l1Zanh2q5qYDeFMe9iOBAnV1IH+lDhRlEkgEuPZgmyE=; b=kxDnd72nHHM7cjB+vxN5Hs91w1xo07bGiEMUjpY0s9QVY27wusrwgH1jWzmu918YkN Lmmezq+t5efpkzKecoRgijZfOknC7sCZzJY9zcZWuwIFC8SObdMM0PlQPsLzN1TJYmt3 ARAcx4uqVD/SNSp7yeyjN8pRWvdOkf26GAI659/UsXparWR3LOXn09i+9rgFcv0kNwQU ZieQb2KSsXON0NhuH2Q/855VdWo5Q3ERhgoaG2Jc0LpvDagN9TGmhDlQ7zrLmfa7DbQq TG3JEcGwHL11zjrT+fbL5ZxH7bQ6O3IATzOlFu4qILJTAAgfPfsDmBKDornouaJxjVpa nSQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=l1Zanh2q5qYDeFMe9iOBAnV1IH+lDhRlEkgEuPZgmyE=; b=FttbgXF30Pt7c6L82JlIgaFX1oOZJIToOn31yfayhmtoBn77Qgq+hGbBVIKcnE4TbY 948v/ePUWKKesMHjHfm7vuytxcgkMvv13jCdWWJcyPucrP/fhzviutTXnza3FFvSWJpD fmuuLZG4MPWBRDmeDyMQIMpMuJlah7LFgrqH1l8NPqji81LEBH1n/2tTjErI0hjWHOoR EgQxrV+Zipk5HjiLmiraBjiWYNTmufNgFfa6cGUTQyd8C/5NAOMG+ZEmYBgfZCfveIAb d+lXN/bzhXO4BEReiV8MKh1A4sukj6KX8kaAEgPAW7Qz1gRzQKV/UD7oUoeKl/Su0HjC ai1A== X-Gm-Message-State: AOAM533KONw9hsp4Fx51LKPW4AmCFXyBTwMdvL8P/my2+y5FIbEy3tbZ a+R6cnfCiFsP9AIl+/YKg1twr9S326fiM+y1jrcq9yE2uLY= X-Google-Smtp-Source: ABdhPJwFvf6IgVuLHrpBp/V5XBfMU2E+qJ2zEn/RCcOTJxvWPEUFqG5Ye/N808gAPc5EJ5Zs/NPDwHTkHmZ4vK+/wEA= X-Received: by 2002:a05:6830:2096:: with SMTP id y22mr13910673otq.339.1590932223886; Sun, 31 May 2020 06:37:03 -0700 (PDT) MIME-Version: 1.0 From: George Mauer Date: Sun, 31 May 2020 08:36:53 -0500 Message-ID: Subject: How to supply multiples of a custom src block header arg To: emacs-orgmode Content-Type: multipart/alternative; boundary="000000000000110b2305a6f1c6b1" Received-SPF: pass client-ip=2607:f8b0:4864:20::329; envelope-from=gmauer@gmail.com; helo=mail-ot1-x329.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: gmauer@gmail.com Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=kxDnd72n; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: yt7PNZGFwlJ7 --000000000000110b2305a6f1c6b1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=3D1 :var bar=3D2 (transduce (in-range 1 10) (folding + 0) #:into into-list) #+end_src ``` Note there=E2=80=99s 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 "=3D=3Dparams %s" params) ... ``` I get ``` =3D=3Dparams ((:var foo . 1) (:var bar . 2) (:colname-names) (:rowname-name= s) (: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? --000000000000110b2305a6f1c6b1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It woul= d seem that `:var` in src blocks gets special treatment.

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

I = do this

```
#+begin_src racket :req= uire rebellion/collection/list :require rebellion/streaming/transducer :var= foo=3D1 :var bar=3D2
=C2=A0 (transduce (in-range 1 10)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(folding + 0)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0#:into into-list)
#+end_src
```

Note there=E2=80=99= s two `:var` headers and two custom `:require` headers

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

```
(defun org-babel-execute:ra= cket (body params)
=C2=A0 "Executes a Racket code block.&quo= t;
=C2=A0 (message "=3D=3Dparams %s" params)
=C2=A0 ...
```

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

<= div>Note that both `:var` headers have corresponding cons cells but only th= e last `:require` header does

What is causing this= behavior and how would I modify it?
--000000000000110b2305a6f1c6b1--