emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH 1/3] ob-table: Fix org-sbe's handling of quotes in argume


From: Nicolas Goaziou
Subject: Re: [O] [PATCH 1/3] ob-table: Fix org-sbe's handling of quotes in arguments
Date: Wed, 14 Mar 2018 14:49:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello,

Vladimir Panteleev <address@hidden> 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 ‘identity’ not found
> in this buffer")
> Eager macro-expansion failure: (error "Reference ‘identity’ not found
> in this buffer")
> Reference ‘identity’ not found in this buffer

What happens if you use (org-sbe "identity" (x ...)) instead?

Regards,

-- 
Nicolas Goaziou                                                0x80A93738



reply via email to

[Prev in Thread] Current Thread [Next in Thread]