emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [PATCH v2 0/3] org-sbe fixes


From: Vladimir Panteleev
Subject: Re: [O] [PATCH v2 0/3] org-sbe fixes
Date: Sun, 25 Mar 2018 20:40:14 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 2018-03-25 20:26, Nicolas Goaziou wrote:
I think this has been applied to the maint branch, but I cannot find a
mention of it in the ORG-NEWS file. Maybe it should be mentioned there
as it is a breaking change. For instance,(I had to modify table formulas like

Sorry, I did not intend this to be a breaking change (for any reasonably valid use cases).

The problem is that because org-sbe is a macro, it attempts to parse the sexpr without evaluating it. The intention was to check what kind of lisp object the argument is, and preserve the old behavior if it's a string, but do something more sensible if it's a list. I.e. "foo" and (identity "foo") are currently treated differently in org-sbe arguments. However, it currently can't do that because the actual evaluation occurs elsewhere (the sexpr is stringified mostly-as-is into a babel header and then parsed as such).

One ugly fix would be to patch over this by checking for some common lisp forms that result in a list, such as (list ...) and (quote ...), and treat the remaining ones in a backwards-compatible way. However, the more time I spend on org-sbe, the more I think that perhaps a better approach would be to deprecate org-sbe (or outright remove it, I could argue that due to the overwhelming number of flaws its mere presence is downright harmful), and replace it with something more sensible: a function (not macro) defined somewhere other than ob-table (because it is not specific to tables) without any of the crazy string escaping logic.

What do you think?

--
Best regards,
 Vladimir



reply via email to

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