* ob-clojure :var header argument not work when src block is noweb called by another src block
@ 2020-02-05 15:28 stardiviner
2020-02-12 9:46 ` stardiviner
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: stardiviner @ 2020-02-05 15:28 UTC (permalink / raw)
To: Org Mode
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ob-clojure :var header argument not work when src block is noweb called by another src block
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
2 siblings, 0 replies; 7+ messages in thread
From: stardiviner @ 2020-02-12 9:46 UTC (permalink / raw)
To: numbchild; +Cc: emacs-orgmode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
This problem is missed, Let me resume it.
stardiviner <numbchild@gmail.com> 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-----
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ob-clojure :var header argument not work when src block is noweb called by another src block
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
2 siblings, 0 replies; 7+ messages in thread
From: stardiviner @ 2020-02-12 9:50 UTC (permalink / raw)
To: numbchild; +Cc: emacs-orgmode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
This problem seems missed. Let me resume it with a gentle ping.
I know not much people in this mailing list using ob-clojure.el. Still hope someone can fix it.
stardiviner <numbchild@gmail.com> 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-----
iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5DykkUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsMHPgf/U9hAaBPj+IB/bqKC5sdWsk1UNrUm
i8oZE3jnvKzyJKmNYv5mSA14VH49uCP/bdZNoaA+8BWtxl5JEwQuXxKMYI946jXw
JcloAG5VIfx4eQwUE3prRjBibLgPrIz6zB+w1GseWvjzqXpKTexgky0gDYmS0BQI
w6nYe4lSlvV4bOtjb8QU+YgtSm17GDaiFGzpfRPPOlVZ0zz0vtGwgTYIT0kJkWd6
N/eoyHXhykNZB0GBujAN8iXYbYPoJ6CHrDZEycLf3cYAeYFHubKRZwoZj85PKMeD
CtSe6ZfR465pjpYD1aZCme3t07b/sCSflKYn6WsqUr9HrvPktlEBQ2GN2w==
=fz33
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ob-clojure :var header argument not work when src block is noweb called by another src block
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
2 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2020-02-12 10:25 UTC (permalink / raw)
To: stardiviner; +Cc: Org Mode
Hi stardiviner,
this should be fixed in latest master, please test it and
report any problem.
Thanks,
--
Bastien
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ob-clojure :var header argument not work when src block is noweb called by another src block
2020-02-12 10:25 ` Bastien
@ 2020-02-12 10:45 ` stardiviner
2020-02-12 11:14 ` Bastien
0 siblings, 1 reply; 7+ messages in thread
From: stardiviner @ 2020-02-12 10:45 UTC (permalink / raw)
To: Bastien; +Cc: Org Mode
[-- 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 --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ob-clojure :var header argument not work when src block is noweb called by another src block
2020-02-12 10:45 ` stardiviner
@ 2020-02-12 11:14 ` Bastien
2020-02-12 12:21 ` stardiviner
0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2020-02-12 11:14 UTC (permalink / raw)
To: stardiviner; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 385 bytes --]
Hi stardiviner,
stardiviner <numbchild@gmail.com> 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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ob-clojure-var-bzg.org --]
[-- Type: text/x-org, Size: 660 bytes --]
* 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"])
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ob-clojure :var header argument not work when src block is noweb called by another src block
2020-02-12 11:14 ` Bastien
@ 2020-02-12 12:21 ` stardiviner
0 siblings, 0 replies; 7+ messages in thread
From: stardiviner @ 2020-02-12 12:21 UTC (permalink / raw)
To: Bastien; +Cc: Org Mode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Bastien <bzg@gnu.org> writes:
> Hi stardiviner,
>
> stardiviner <numbchild@gmail.com> 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,
Indeed, so I guess this is not supported in Org Mode originally.
Is it possible to support it? Or does it have a value to support?
Well, the first obvious reason is to avoid repeated typing and redundant input
data.
If this is not possible or very difficult to implement. I will not insist on
this. I guess we have other solution on Babel to archive same purpose. WDYT?
- --
[ 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-----
iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5D7dAUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsP7kAf/ZOOCzlh/268k4w+djC/BVQFuSTDT
XuNS9ITKDhhbe3jnUZt/UTU5x4CmnfUAdvaXNeYaOEppEEgSHpuYJA741gbtnuZj
J40EDLaHjAy5/3lx/d67XE7cnk7Y3+M9423/L8hOfEdV0GQcxJlJcJRTfIhZLAVq
hdgm+5sZ4zksCbZjq5ElC6Q7VkUdweq+bLn3uof1QO/EdBVmOeklLbmpVS8JZPCl
p15d/lByXJj7Lh5q5zPltUEd6vS67VGQ1gPVxtrhCIAUudVclAqEVuRSffTc7zeM
nb8RaFS5KX2tK0thNvXjGWsWZfngVTRUoUP/v+6mhz9OwkfJy83pp9DXEg==
=WDAV
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-02-12 12:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2020-02-12 11:14 ` Bastien
2020-02-12 12:21 ` stardiviner
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.