From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Panteleev Subject: [PATCH 0/3] org-sbe fixes Date: Wed, 7 Mar 2018 22:58:44 +0000 Message-ID: <20180307225847.24068-1-git@thecybershadow.net> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eti1R-0001Xo-Pl for emacs-orgmode@gnu.org; Wed, 07 Mar 2018 17:58:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eti1O-0000r6-NP for emacs-orgmode@gnu.org; Wed, 07 Mar 2018 17:58:57 -0500 Received: from mail-wr0-f175.google.com ([209.85.128.175]:35417) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eti1O-0000qV-GW for emacs-orgmode@gnu.org; Wed, 07 Mar 2018 17:58:54 -0500 Received: by mail-wr0-f175.google.com with SMTP id l43so3829287wrc.2 for ; Wed, 07 Mar 2018 14:58:53 -0800 (PST) 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: emacs-orgmode@gnu.org Cc: Vladimir Panteleev Inspired by this SE question: https://emacs.stackexchange.com/questions/32895/how-to-feed-range-from-org-table-filled-with-strings-to-code-block-via-tblfm Passing table ranges through org-sbe is too hard, and even then the solution there was not fully correct (did not handle empty cells and '"' characters properly). As it turns out, we can improve the situation by addressing some critical shortcomings in the implementation of org-sbe itself. There are still quite a few "funny" things left about org-sbe: - How var and "var" (as the value for a variable) mean the same thing. This matches the syntax used in org-mode documents, but doesn't make much sense as part of an API. This creates an additional hurdle of using it in tables (references must be further $-prefixed, and this $-prefixing will fail in a bad way with ranges). - The confusing $"string" syntax (or $$3 in tables). It looks like some distinct syntax (like bash localizable strings), but $"string" is in fact parsed as two tokens ($ and "string"). - The undocumented syntax where using more than one value for a variable implicitly converts it into a list. - How these implicit lists are handled differently than single values, including when they are also lists. - The way it encodes its parameters into a string, just so another part of org-mode can decode it later. This happens on two levels, org-babel-parse-header-arguments (in org-sbe itself) and parsing of the actual argument values. - How there are no tests for the entire file, except one that has been disabled and left as a TODO since 2011. This is my first org-mode contribution. I've already done the copyright assignment process for my first Emacs contribution from last year, so hopefully that applies here as well. Vladimir Panteleev (3): ob-table: Fix org-sbe's handling of quotes in arguments ob-table: Fix org-sbe's handling of list arguments ob-table: Mention passing ranges as lists in org-sbe's documentation lisp/ob-table.el | 21 ++++++++++++++------- testing/lisp/test-ob-table.el | 30 ++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 7 deletions(-) -- 2.16.2