Nicolas Goaziou <m...@nicolasgoaziou.fr> writes:
> Anyway, I tried the following block: > > #+begin_src emacs-lisp :var encrypted="base64 encrypt text" > encrypted > #+end_src > > and the output is > > #+results: > : base64 encrypt text > > which means there doesn't seem to be a problem with strings within > quotes. > > Regards, Oops, I misunderstand the :var variable="literal quoted string". I want to reference the named source's result in variable. Like: **** encrypt text -- ~<<< [TEXT]~ #+NAME: base64 encrypt text #+begin_src sh base64 <<< "stardiviner <numbch...@gmail.com>" #+end_src #+RESULTS: base64 encrypt text : c3RhcmRpdmluZXIgPG51bWJjaGlsZEBnbWFpbC5jb20+Cg== **** decrypt text -- ~-d~ #+begin_src sh :var encrypted=<base64 encrypt text> # base64 -d <<< c3RhcmRpdmluZXIgPG51bWJjaGlsZEBnbWFpbC5jb20+Cg== # base64 -d <<< $encrypted echo $encrypted #+end_src #+RESULTS[<2018-10-20 16:46:10> 6e5d3875d0928eb95ec1356661f965bdf4882244]: I can use #+NAME: base64-encrypt-text for first source block, and :var encrypted=base64-encrypt-text for second source block. So it can work. But is it possible to allow space in source block name and make it still can be referenced? Like quote it with <> around the name as my upper example? -- [ stardiviner ] don't need to convince with trends. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3