From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Org source block header argument :var does not support space separated string Date: Sat, 20 Oct 2018 22:17:10 +0200 Message-ID: <878t2sgypl.fsf@nicolasgoaziou.fr> References: <87sh11htsy.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDxgX-0000zH-JH for emacs-orgmode@gnu.org; Sat, 20 Oct 2018 16:17:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDxgS-0002PF-Kq for emacs-orgmode@gnu.org; Sat, 20 Oct 2018 16:17:21 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:39247) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gDxgQ-0002J6-MP for emacs-orgmode@gnu.org; Sat, 20 Oct 2018 16:17:16 -0400 In-Reply-To: <87sh11htsy.fsf@gmail.com> (stardiviner's message of "Sat, 20 Oct 2018 17:05:33 +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.org@gnu.org Sender: "Emacs-orgmode" To: stardiviner Cc: org-mode Hello, stardiviner writes: > Org source block header argument :var does not support quoted string with space separator like bellowing example: > > For example > > **** encrypt text -- ~<<< [TEXT]~ > > #+NAME: base64 encrypt text > #+begin_src sh > > base64 <<< "stardiviner " #+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 > #+end_src > > If I use #+NAME: base64-encrypt-text and :var > encrypted=base64-encrypt-text, then it works fine. I cannot reproduce your issues, literally. It complains about a redirection error or something. 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, -- Nicolas Goaziou