From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH 1/3] ob-table: Fix org-sbe's handling of quotes in arguments Date: Wed, 14 Mar 2018 14:49:12 +0100 Message-ID: <87605yn4x3.fsf@nicolasgoaziou.fr> References: <20180307225847.24068-1-git@thecybershadow.net> <20180307225847.24068-2-git@thecybershadow.net> <87muzcans9.fsf@nicolasgoaziou.fr> <9107300b-c95d-ad16-ca03-088d173c90d9@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ew6mN-0005sV-Pi for emacs-orgmode@gnu.org; Wed, 14 Mar 2018 09:49:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ew6mJ-0003QS-Rg for emacs-orgmode@gnu.org; Wed, 14 Mar 2018 09:49:19 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:53367) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ew6mJ-0003Pe-Kw for emacs-orgmode@gnu.org; Wed, 14 Mar 2018 09:49:15 -0400 In-Reply-To: <9107300b-c95d-ad16-ca03-088d173c90d9@gmail.com> (Vladimir Panteleev's message of "Tue, 13 Mar 2018 19:16:57 +0000") 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: Vladimir Panteleev Cc: emacs-orgmode@gnu.org, Vladimir Panteleev Hello, Vladimir Panteleev writes: > I agree that it is strange. I mentioned it (and its strangeness) in > the cover-letter. The documentation of org-sbe describes it as well. AFAICT, it doesn't. "org-sbe" describes a dollar _prefix_, but yours stands on its own. It prefixes nothing. Also, it seems to apply only to cell's references, whereas your example provides a strings which is clearly not a reference. I'm confused. >>> +#+name: identity >>> +#+begin_src emacs-lisp :eval yes >>> + x >>> +#+end_src" >>> + (should (equal "a\"b\"c" >>> + (eval '(org-sbe identity (x $ "a\"b\"c"))))))) >> >> Why `eval'? Why not simply (org-sbe identity (x ...)) ? > > Ah, I guess that's another "funny" thing about org-sbe that I forgot > to mention. It is a macro, but it does some things that are rather > non-macro-y. In this case, eval is required, otherwise it will attempt > to parse the Org document during Lisp *compilation*, and you will see: > > Eager macro-expansion failure: (error "Reference =E2=80=98identity=E2=80= =99 not found > in this buffer") > Eager macro-expansion failure: (error "Reference =E2=80=98identity=E2=80= =99 not found > in this buffer") > Reference =E2=80=98identity=E2=80=99 not found in this buffer What happens if you use (org-sbe "identity" (x ...)) instead? Regards, --=20 Nicolas Goaziou 0x80A93738