From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Johan_W=2E_Kl=C3=BCwer?= Subject: Bug: org-babel-script-escape misses a lonely double quote [8.2.10 (8.2.10-23-g1ec416-elpaplus @ c:/Users/jowik/.emacs.d/elpa/org-plus-contrib-20141208/)] Date: Thu, 11 Dec 2014 02:07:13 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e013d0b747fb59f0509e665f6 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XysDt-0001dq-CQ for emacs-orgmode@gnu.org; Wed, 10 Dec 2014 20:07:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XysDq-0007I8-M7 for emacs-orgmode@gnu.org; Wed, 10 Dec 2014 20:07:17 -0500 Received: from mail-ie0-x22f.google.com ([2607:f8b0:4001:c03::22f]:58119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XysDq-0007Hu-HR for emacs-orgmode@gnu.org; Wed, 10 Dec 2014 20:07:14 -0500 Received: by mail-ie0-f175.google.com with SMTP id x19so3771654ier.6 for ; Wed, 10 Dec 2014 17:07:13 -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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --089e013d0b747fb59f0509e665f6 Content-Type: text/plain; charset=UTF-8 I encountered a problem with unmatched double quotes in an org-babel table of results. Seems like the issue lies with escaped double quotes: (org-babel-script-escape "[[\"a\", \"b\\\"\"]]") returns error > Invalid read syntax: "] in a list". Adding the following after line 41 of org-babel-script-escape appears to fix the problem. (92 (if in-single ; \ (append (list 92 34 out)) (setq in-double (not in-double)) (cons 92 out))) We now get (org-babel-script-escape "[[\"a\", \"b\\\"\"]]") (("a" "b\"")) Johan --089e013d0b747fb59f0509e665f6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I encountered a problem with unmatched double quotes in an= org-babel
table of results. Seems like the issue lies with escaped doub= le quotes:

=C2=A0 (org-babel-script-escape "[[\"a\", = \"b\\\"\"]]")

=C2=A0 returns error >=C2=A0 In= valid read syntax: "] in a list".

Adding the following aft= er line 41 of org-babel-script-escape appears to
fix the problem.
=C2=A0 (92 (if in-single ; \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 (append (list 92 34 out))
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (setq in= -double (not in-double)) (cons 92 out)))

We now get

=C2=A0 (o= rg-babel-script-escape "[[\"a\", \"b\\\"\"]]&= quot;)
=C2=A0 (("a" "b\""))


Johan
--089e013d0b747fb59f0509e665f6--