emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH] ob-clojure.el: Add support for babashka and nbb backend
Date: Wed, 17 Nov 2021 23:12:02 +0700	[thread overview]
Message-ID: <sn39kj$gpg$1@ciao.gmane.io> (raw)
In-Reply-To: <87o86lo0wv.fsf@kraus.my>

On 15/11/2021 23:05, Daniel Kraus wrote:
> Max Nikulin writes:
> Attached is the patch changed the logic to use a temp file with org-babel-eval.

Thank you for contribution. I do not have strong objection any more. I 
am not familiar with babel internals, so I leave further discussion to 

If you have not signed copyright assignment yet, likely you should do it 
to proceed (I am unsure concerning precise rules concerning line 
counting). See https://orgmode.org/contribute.html and 
https://orgmode.org/worg/org-contribute.html for details.

> Somehow it doesn't feel too great to create unnecessary temp files
> but I looked how other babel backends do it and e.g. ob-js and ob-haskell
> use the same logic.

Code fragment might be huge enough to exceed limit on arguments length, 
so I think that file is safer. Some interpreters and compilers generates 
more meaningful errors and stacktraces when act on a file. Another 
option is to feed content to process standard input. With `call-process' 
or an related command it should be possible to implement any variant, 
including raw argument without intermediate shell pass. See info 
"(elisp) Synchronous Processes" or 

> +    (with-temp-file script-file
> +      (insert expanded))
> +    (org-babel-eval
> +     (format "%s %s" bb (org-babel-process-file-name script-file))
> +     "")))

Since other babel packages use the same approach, I will not argue. By 
the way, isn't second argument of `org-babel-eval' intended for code 
that may be executed without a temporary file?

Some babel languages support sessions. I have no idea if it is 
applicable to babashka.

  reply	other threads:[~2021-11-17 16:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-14 15:28 [PATCH] ob-clojure.el: Add support for babashka and nbb backend Daniel Kraus
2021-11-14 16:25 ` Max Nikulin
2021-11-14 16:30   ` Daniel Kraus
2021-11-15 14:33     ` Max Nikulin
2021-11-15 16:05       ` Daniel Kraus
2021-11-17 16:12         ` Max Nikulin [this message]
2021-11-20 10:18           ` Daniel Kraus
2021-12-22 22:34             ` Daniel Kraus
2022-01-31  7:58         ` Daniel Kraus
2022-02-02 15:58           ` Max Nikulin
2022-06-11  7:45           ` Ihor Radchenko
2022-09-25  3:10         ` Bastien
2022-09-25 13:37           ` Christopher M. Miles
2022-09-25 13:43           ` Christopher M. Miles
     [not found]           ` <20969.6847757854$1664113375@news.gmane.org>
2022-09-25 13:48             ` Bastien
2022-09-26 16:02           ` Daniel Kraus
2022-09-27  2:31             ` Ihor Radchenko
2022-09-27 19:39             ` Bastien
2022-09-28  1:16               ` [WORG] Document in more detail about what maintainers do? (was: [PATCH] ob-clojure.el: Add support for babashka and nbb backend) Ihor Radchenko
2022-09-28  6:56                 ` [WORG] Document in more detail about what maintainers do? Bastien
2022-09-29  7:06                   ` Ihor Radchenko
2022-10-29  6:28                     ` Ihor Radchenko
2022-10-29  8:06                       ` Bastien Guerry

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:

  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='sn39kj$gpg$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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