From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KASPK6If915zXwAA0tVLHw (envelope-from ) for ; Sat, 27 Jun 2020 10:29:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id cGJCJ6If9179CgAAbx9fmQ (envelope-from ) for ; Sat, 27 Jun 2020 10:29:54 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 30D8A940539 for ; Sat, 27 Jun 2020 10:29:52 +0000 (UTC) Received: from localhost ([::1]:35222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jp85l-00044X-Nj for larch@yhetil.org; Sat, 27 Jun 2020 06:29:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jp85K-00044L-1H for emacs-orgmode@gnu.org; Sat, 27 Jun 2020 06:29:22 -0400 Received: from mail-ej1-f47.google.com ([209.85.218.47]:42329) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jp85D-0006ci-Va for emacs-orgmode@gnu.org; Sat, 27 Jun 2020 06:29:21 -0400 Received: by mail-ej1-f47.google.com with SMTP id i14so11655679ejr.9 for ; Sat, 27 Jun 2020 03:29:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1+JjVzf0T4fVg7QGVV3TezJ86NzHkJcY5AHVVZQH+a4=; b=mZS0/251hQ9YdRbz1Fq0ilMgSebBQAk5A9I7MCxSQnG8XIkfeEznN2jcKXUNOJcvmD qqQPjKjG4zfkPBOBQy/CzYCA7PdlMuETKR0tsV3OTkdnQPAVl+mR1zoOs90ZIBEY1iFW AwtWrtE5pMnJlux2QgPR9a1wF9vpXMWKGAKe9A1sXfZfXEKvoboCL+XDo+mjU+C0eJ2V f8O9d9LeahiFkcQOSX70GQyLkr3v3jSPO+Dt2ao4rc3dsS7s3gzs85stca7V/BLyomP/ pshWMKvNMEldDCbmdKo+oz1LrcPK2dp3fzpTF2SNPRYoumTDPSuAYCX2EPKN4z0u1H8r Z2FQ== X-Gm-Message-State: AOAM530Lm1rozK4ozQoqRV4TWiGAlE/2K0foFjL4aNNLjDWcizcMcwDY Z7dWnvwfj2WxDjwhPJLdXOoPt2a+x0MASjj/fWE= X-Google-Smtp-Source: ABdhPJzSIBDz4ch1766lRrt70fqEQUgw864R9qBCfjtRV3eHvduTJig6DobXApPOmltroAaa3LWXVnTEHdetxv1c+14= X-Received: by 2002:a17:906:4d18:: with SMTP id r24mr6012414eju.222.1593253754493; Sat, 27 Jun 2020 03:29:14 -0700 (PDT) MIME-Version: 1.0 References: <87d05nidu1.fsf@iki.fi> <87pn9l2i7z.fsf@iki.fi> In-Reply-To: <87pn9l2i7z.fsf@iki.fi> From: ian martins Date: Sat, 27 Jun 2020 06:29:03 -0400 Message-ID: Subject: Re: Babel: parse error when output contains opening bracket To: Jarmo Hurri Content-Type: multipart/alternative; boundary="00000000000012df4705a90e4c9f" Received-SPF: pass client-ip=209.85.218.47; envelope-from=ianxm1@gmail.com; helo=mail-ej1-f47.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/27 06:29:14 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=jhu.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 0.59 X-TUID: +gVH0wEbypg6 --00000000000012df4705a90e4c9f Content-Type: text/plain; charset="UTF-8" On Sat, Jun 27, 2020 at 1:25 AM Jarmo Hurri wrote: > ian martins writes: > > Hello. > > > I've written an alternative org-java.el that doesn't have that > > problem. I wanted to add it to contrib/ but haven't been able to get > > access. if you want to try it I can post it somewhere. > > Sounds excellent. > > Would it be possible for us to fix the current version without > introducing a new one? Can you identify the parts of your code that fix > the issue? > The existing code creates the java program and runs it correctly, but it uses `org-babel-import-elisp-from-file' to interpret the results, and that sees the bracket and tries to make the response into a list, and errors when it can't. I don't see a quick fix for it. If you allow unbalanced brackets but that would be a change in ob-core and would probably cause unwanted results in other places. If you don't try to convert the output into a list, you can't present java results as lists or tables. Really the problem is that ob-java doesn't support functional mode, so it tries to guess if scripting mode output should be a table or list. The version I wrote supports functional and scripting modes and doesn't use `org-babel-import-elisp-from-file'. > > I am already a contributor, so if you can post your solution here I can > create a patch and give you the credit. > I would really appreciate that if you are willing, but it's a significant change (code is 400 lines, 600 lines of tests and test data) and there might be iterations so you might be signing up for more than you realize. > > How does that sound? > > Jarmo > > > --00000000000012df4705a90e4c9f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Jun 27, 2020 at 1:25 AM Jarmo Hurri <jarmo.hurri@iki.fi> wrote:
ian martins <ianxm@jhu.edu> writes:

Hello.

> I've written an alternative org-java.el that doesn't have that=
> problem. I wanted to add it to contrib/ but haven't been able to g= et
> access. if you want to try it I can post it somewhere.

Sounds excellent.

Would it be possible for us to fix the current version without
introducing a new one? Can you identify the parts of your code that fix
the issue?
The existing code creates the java program = and runs it correctly, but it uses `org-babel-import-elisp-from-file' t= o interpret the results, and that sees the bracket and tries to make the re= sponse into a list, and errors when it can't. I don't see a quick f= ix for it. If you allow unbalanced brackets but that would be a change in o= b-core and would probably cause unwanted results in other places. If you do= n't try to convert the output into a list, you can't present java r= esults as lists or tables.=C2=A0 Really the problem is that ob-java doesn&#= 39;t support functional mode, so it tries to guess if scripting mode output= should be a table or list.=C2=A0 The version I wrote supports functional a= nd scripting modes and doesn't use `org-babel-import-elisp-from-file= 9;.
=C2=A0

How does that sound?

Jarmo


--00000000000012df4705a90e4c9f--