emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: George Mauer <gmauer@gmail.com>
To: Tim Cross <theophilusx@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Thoughts on this ob language generator
Date: Sat, 14 Jan 2023 22:00:28 -0600	[thread overview]
Message-ID: <CA+pajWJU_0vOdO06kb7PHOADHypEPHLzTZL_K7-bRiMctpC3TA@mail.gmail.com> (raw)
In-Reply-To: <63c359bc.170a0220.131fc.b279@mx.google.com>

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

Thanks a lot Tim, I really appreciate you responding (as you said, it can
be discouraging to not get any response)

For the record, I just tried this simple example and it works

#+begin_src emacs-lisp :results silent
  (create-ob-npx :name "ob-nbb"
                 :language "clojurescript"
                 :npx-arguments "nbb")
#+end_src

#+begin_src clojurescript
  (prn (+ 1 2 3))
#+end_src

#+RESULTS:
: 6


Never pushed anything to MELPA before but will have to take a look at how
to do this.

On Sat, Jan 14, 2023 at 7:41 PM Tim Cross <theophilusx@gmail.com> wrote:

> George Mauer <gmauer@gmail.com> writes:
>
> > I had a need the other day to execute some typescript in an org
> document. Now I know that there's an
> > ob-typescript package but that doesn't quite work the way I want and
> expects typescript to be installed
> > globally (which runs into a variety of versioning issues).
> >
> > There is a better option available with the `npx` program (installed
> alongside `npm`) which can install a
> > package along with its dependencies into a temporary sandbox and run its
> binaries.
> >
> > I rewrote the typescript babel plugin to do this and then realized that
> there was relatively little in it
> > beyond variable and function names that was typescript-specific. The
> exact same process can be used for
> > anything that has an interpreter up on npm. Coffeescript, mermaidjs, all
> sorts of things.
> >
> > So I made a macro. I'm interested what people here think:
> https://github.com/togakangaroo/create-ob-npx
>
> This looks interesting and could have some great potential. As you say,
> tehre is a growing class of languages which could be supported using
> this method. I'm interested in trying out the nbb package (Clojurescript
> on node) using this method, but right now, no time.
>
> Really just wanted to give feedbac as I noticed nobody else responded
> and didn't want to give the impression there was no interest.
>
>

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

  reply	other threads:[~2023-01-15  4:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-14  2:11 Thoughts on this ob language generator George Mauer
2023-01-15  1:34 ` Tim Cross
2023-01-15  4:00   ` George Mauer [this message]
2023-01-18 12:11 ` Ihor Radchenko

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=CA+pajWJU_0vOdO06kb7PHOADHypEPHLzTZL_K7-bRiMctpC3TA@mail.gmail.com \
    --to=gmauer@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=theophilusx@gmail.com \
    /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).