From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Panteleev Subject: Re: [PATCH v2 0/3] org-sbe fixes Date: Sun, 25 Mar 2018 20:40:14 +0000 Message-ID: References: <87605tc67l.fsf@nicolasgoaziou.fr> <20180319002314.8162-1-git@thecybershadow.net> <87woy7br6q.fsf@nicolasgoaziou.fr> <877epzaolf.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0CRD-0000Xr-Dt for emacs-orgmode@gnu.org; Sun, 25 Mar 2018 16:40:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f0CR8-0004B0-9N for emacs-orgmode@gnu.org; Sun, 25 Mar 2018 16:40:23 -0400 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:34118) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f0CR8-0004Ai-0V for emacs-orgmode@gnu.org; Sun, 25 Mar 2018 16:40:18 -0400 Received: by mail-wm0-x22f.google.com with SMTP id a20so13966048wmd.1 for ; Sun, 25 Mar 2018 13:40:17 -0700 (PDT) In-Reply-To: <877epzaolf.fsf@nicolasgoaziou.fr> Content-Language: en-US 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: Nicolas Goaziou , Alan Schmitt Cc: emacs-orgmode@gnu.org 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