emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: stardiviner <numbchild@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: ob-clojure :var header argument not work when src block is noweb called by another src block
Date: Wed, 12 Feb 2020 12:14:03 +0100	[thread overview]
Message-ID: <87zhdo12is.fsf@gnu.org> (raw)
In-Reply-To: <871rr0w0bt.fsf@gmail.com> (stardiviner's message of "Wed, 12 Feb 2020 18:45:42 +0800")

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

Hi stardiviner,

stardiviner <numbchild@gmail.com> writes:

> You can see the error result in the src block.

The attached .org file works for me - I put requirements in a separate
source block and I repeat the :var setting in the last src block.

If you find an occurrence in other languages where the repeated setting
is not needed, please give me an example.

Thanks,

-- 
 Bastien

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ob-clojure-var-bzg.org --]
[-- Type: text/x-org, Size: 660 bytes --]

* test example

#+begin_src clojure
(require '[clojure.java.io :as io])
#+end_src

#+RESULTS:
: nil

#+NAME: read-in-wxid
#+begin_src clojure :var cwd=(file-truename "~/org/")
(def directory (io/file cwd))
(def files (filter #(.isFile %) (file-seq directory)))
#+end_src

#+RESULTS: read-in-wxid
: #'user/files

#+begin_src clojure :noweb yes :results pp :var cwd=(file-truename "~/org/")
<<read-in-wxid>>
(take 3 user/files)
#+end_src

#+RESULTS:
: (#object[java.io.File 0x3caf7341 "/home/guerry/org/.gitattributes"]
:  #object[java.io.File 0x3afb2723 "/home/guerry/org/clojure.org"]
:  #object[java.io.File 0x36b68109 "/home/guerry/org/.git/description"])



  reply	other threads:[~2020-02-12 11:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 15:28 ob-clojure :var header argument not work when src block is noweb called by another src block stardiviner
2020-02-12  9:46 ` stardiviner
2020-02-12  9:50 ` stardiviner
2020-02-12 10:25 ` Bastien
2020-02-12 10:45   ` stardiviner
2020-02-12 11:14     ` Bastien [this message]
2020-02-12 12:21       ` stardiviner

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=87zhdo12is.fsf@gnu.org \
    --to=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=numbchild@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

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