emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: ian martins <ianxm@jhu.edu>
To: Jarmo Hurri <jarmo.hurri@iki.fi>
Cc: emacs-orgmode@gnu.org
Subject: Re: Babel: parse error when output contains opening bracket
Date: Sat, 27 Jun 2020 06:29:03 -0400	[thread overview]
Message-ID: <CAC=rjb7EB60PYMSwRvGLEEVanLP+-NQ3VY9OC9C5yJgDtKTZ7A@mail.gmail.com> (raw)
In-Reply-To: <87pn9l2i7z.fsf@iki.fi>

[-- Attachment #1: Type: text/plain, Size: 1640 bytes --]

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 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
>
>
>

[-- Attachment #2: Type: text/html, Size: 2416 bytes --]

  reply	other threads:[~2020-06-27 10:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-25 11:28 Babel: parse error when output contains opening bracket Jarmo Hurri
2020-06-27  0:31 ` ian martins
2020-06-27  5:25   ` Jarmo Hurri
2020-06-27 10:29     ` ian martins [this message]
2020-06-28  5:55       ` Jarmo Hurri
2020-06-28 12:49         ` ian martins
2020-06-30  4:13           ` Jarmo Hurri
2020-06-30 10:27             ` ian martins
2020-09-06  9:56   ` Bastien
2020-09-08 21:53     ` ian martins
2020-09-09  8:02       ` Bastien
2020-09-06  9:51 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAC=rjb7EB60PYMSwRvGLEEVanLP+-NQ3VY9OC9C5yJgDtKTZ7A@mail.gmail.com' \
    --to=ianxm@jhu.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=jarmo.hurri@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).