From mboxrd@z Thu Jan 1 00:00:00 1970 From: "numbchild@gmail.com" Subject: ob-clojure can't cross source block handle :var in :noweb source block Date: Wed, 28 Aug 2019 09:22:50 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ef5f3b0591233b8f" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34151) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2mgD-0002MD-Sg for emacs-orgmode@gnu.org; Tue, 27 Aug 2019 21:23:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2mgC-0005qf-LZ for emacs-orgmode@gnu.org; Tue, 27 Aug 2019 21:23:21 -0400 Received: from mail-vs1-xe2a.google.com ([2607:f8b0:4864:20::e2a]:36287) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i2mgC-0005q9-DE for emacs-orgmode@gnu.org; Tue, 27 Aug 2019 21:23:20 -0400 Received: by mail-vs1-xe2a.google.com with SMTP id y16so774508vsc.3 for ; Tue, 27 Aug 2019 18:23:19 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Org-mode --000000000000ef5f3b0591233b8f Content-Type: text/plain; charset="UTF-8" I have bellowing example: ```org #+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 <> (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 ``` You can see it can't resole first source block's `:var` definition. I'm using: - GNU Emacs 26.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.8) of 2019-04-13 - Org mode version 9.2.1 (release_9.2.1-274-ge3b7c3.dirty @ /home/stardiviner/Code/Emacs/org-mode/lisp/) [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 Blog: http://stardiviner.github.io/ --000000000000ef5f3b0591233b8f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I have bellowing example:
```org
#+NAME: read-in= -wxid
#+begin_src clojure :var cwd=3D(file-truename "~/Documents/We= Chat/wxid/")
(require '[cloj= ure.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 :resul= ts pp
<<read-in-wxid>>
(take 3 files)
#+end_src
#+RESULTS[<2019-08-28 09:12:30> 9bbcd9f779f72bdd9b7bb8fb85aa36bbdfee= 7e3c]:
: class clojure.lang.Compiler$CompilerExceptionclass clojure.lang= .Compiler$CompilerExceptionSyntax error compiling at (*Org Src Code.org[ cl= ojure ]*:3:16).
: Unable to resolve symbol: cwd in this context
```=

You can see it can't resole first source block's `:= var` definition.

I'm using:
- GNU Emacs 26.2 (build= 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.8) of 2019-04-13
- Org mode= version 9.2.1 (release_9.2.1-274-ge3b7c3.dirty @ /home/stardiviner/Code/Em= acs/org-mode/lisp/)

<= div>
[stardiviner]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 <Hack this world!>=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 GPG key ID: 47C32433
IRC(freeenode): stardiviner =C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 Twitter:=C2=A0 @numbchild
Key fingerprint =3D 9BAA= 92BC CDDD B9EF 3B36=C2=A0 CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/=
--000000000000ef5f3b0591233b8f--