emacs-orgmode
[Top][All Lists]
Advanced

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

Re: ob-clojure :var header argument not work when src block is noweb cal


From: Bastien
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi stardiviner,

stardiviner <address@hidden> 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
* 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 via email to

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