[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: |
stardiviner |
Subject: |
Re: ob-clojure :var header argument not work when src block is noweb called by another src block |
Date: |
Wed, 12 Feb 2020 17:46:35 +0800 |
User-agent: |
mu4e 1.3.8; emacs 27.0.50 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
This problem is missed, Let me resume it.
stardiviner <address@hidden> writes:
> Here is an example:
>
> #+NAME: read-in-wxid
> #+begin_src clojure :var cwd=(file-truename "~/Documents/WeChat/wxid/")
> (require '[clojure.java.io :as io])
>
> (def directory (io/file cwd))
> (def files (filter #(.isFile %) (file-seq directory)))
> #+end_src
>
> #+RESULTS[<2019-08-28 09:12:24> 84a1210d836742ca71ddddc776aaebba0e0224af]:
> read-in-wxid
> : #'user/files
>
> #+begin_src clojure :noweb yes :results pp
> <<read-in-wxid>>
> (take 3 files)
> #+end_src
>
> #+RESULTS[<2019-08-28 09:12:30> 9bbcd9f779f72bdd9b7bb8fb85aa36bbdfee7e3c]:
> : class clojure.lang.Compiler$CompilerExceptionclass
> clojure.lang.Compiler$CompilerExceptionSyntax error compiling at (*Org Src
> Code.org[ clojure ]*:3:16).
> : Unable to resolve symbol: cwd in this context
- --
[ stardiviner ]
I try to make every word tell the meaning what I want to express.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
-----BEGIN PGP SIGNATURE-----
iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5DyaEUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsNf7ggAxeVNocyCnuHdy8hhk1xNDJ3EXBay
PHquEzImS014tFh2I5yd7OsrtMlbVJ5W9Z4r81ZNsrFtEjYybweiVXsfmGbUjZmN
I8AaNqUMQBSWbaSeHrNETX5jTLFJEG86aPsMcvspDBnQtUbfcKl+zveiaC2pvMYh
XPzp6xVuQrRDIET6TljQbw9cwlI/8n2q5G/0ts73MdmAlXIKuvcGpgkY9gul7Csy
vc1t4wzVXVEllGzEEIK72VegJqi83ACO9n3HTVZqs/hxHmpPjLOI+avi0EiKydi4
G8IHD4FZ6KslkO6epcz4XHAdpuhlN++pvqlmLDldfQUsrBAnEUs9lppbDw==
=vGvD
-----END PGP SIGNATURE-----