From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-ID: <87zhdo12is.fsf@gnu.org> References: <874kw55a04.fsf@gmail.com> <874kvw2jck.fsf@gnu.org> <871rr0w0bt.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:42561) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1py2-0005US-8j for emacs-orgmode@gnu.org; Wed, 12 Feb 2020 06:14:07 -0500 In-Reply-To: <871rr0w0bt.fsf@gmail.com> (stardiviner's message of "Wed, 12 Feb 2020 18:45:42 +0800") 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: stardiviner Cc: Org Mode --=-=-= Content-Type: text/plain Hi stardiviner, stardiviner 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 --=-=-= Content-Type: text/x-org Content-Disposition: inline; filename=ob-clojure-var-bzg.org * 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/") <> (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"]) --=-=-=--