emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: stardiviner <numbchild@gmail.com>
To: Bastien <bzg@gnu.org>
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 18:45:42 +0800	[thread overview]
Message-ID: <871rr0w0bt.fsf@gmail.com> (raw)
In-Reply-To: <874kvw2jck.fsf@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 749 bytes --]


I check out the latest master, seems still not fixed.

From your another thread email, I guess you don't have email reading with Org
Mode, so can't read org format text. So I attach an Org file for testing
ob-clojure :var header argument in noweb reference in attachment.

You can see the error result in the src block.

Bastien <bzg@gnu.org> writes:

> Hi stardiviner,
>
> this should be fixed in latest master, please test it and
> report any problem.
>
> Thanks,


-- 
[ 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
      

[-- Attachment #1.2: ob-clojure-var.org --]
[-- Type: text/plain, Size: 760 bytes --]

* test 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[<2020-02-12 18:41:03> 559e1d5d2e56334675f94f553b0d89c18ae938dc]: 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$CompilerExceptionCompilerException java.lang.RuntimeException: Unable to resolve symbol: cwd in this context, compiling:(*Org Src Code.org[ clojure ]*:3:16) 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 515 bytes --]

  reply	other threads:[~2020-02-12 10:46 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 [this message]
2020-02-12 11:14     ` Bastien
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=871rr0w0bt.fsf@gmail.com \
    --to=numbchild@gmail.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    /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).