all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eduardo Ochs <eduardoochs@gmail.com>
To: Emacs developers <emacs-devel@gnu.org>
Subject: Emacs <-> Lua bridge
Date: Sun, 18 Apr 2021 01:32:27 -0300	[thread overview]
Message-ID: <CADs++6hLZc1L4gthC1W9+b3n_kZ4MjesG6v4xkWwXE6R7Y1xAA@mail.gmail.com> (raw)

Hi list,

about a month ago I asked on the Lua mailing list if anyone there had
tried to create an Emacs module that would load Lua and then start a
Lua interpreter and let Emacs call it...

I received this answer,

  http://lua-users.org/lists/lua-l/2021-03/msg00084.html

and today I finally had time to compile that code on Debian and test
it. It looks prototype-ishy, but it is surprisingly functional - if we
run something that returns several values, like the second sexp here,

  (emlua-dostring "a = 22")
  (emlua-dostring "return a+33, '44', {}")

it retuns a vector like this,

  ["55" "44" "table: 0x55f5e0a15a10"]

with tostring-ed versions of all its return values, and if we run
something that yields an error it returns a string with Lua's error
message.

I haven't played much with it yet.
Happy hacking =),

  Eduardo Ochs
  http://angg.twu.net/#eev
  http://angg.twu.net/emacsconf2020.html



             reply	other threads:[~2021-04-18  4:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-18  4:32 Eduardo Ochs [this message]
2021-04-18  4:45 ` Emacs <-> Lua bridge Eduardo Ochs
2021-04-18 20:16   ` michael schuldt
2021-04-19  7:40     ` Eduardo Ochs
2021-05-11  7:38       ` michael schuldt

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

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

  git send-email \
    --in-reply-to=CADs++6hLZc1L4gthC1W9+b3n_kZ4MjesG6v4xkWwXE6R7Y1xAA@mail.gmail.com \
    --to=eduardoochs@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.