[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Emlua: run Lua in Emacs as a module

From: Eduardo Ochs
Subject: Emlua: run Lua in Emacs as a module
Date: Mon, 28 Mar 2022 17:22:09 -0300

Hi all,

I spent the last days working on this:

  Title: Emlua: run Lua in Emacs as a module

I think that the Lua part will interest very few people in this
mailing list, but emlua contains four eev tricks that are not obvious
at all, and that may be useful to people here.

  1) Red star lines can contain arbitrary sexps - they are not
     restricted to sexps that configure eepitch. The script in

     uses a few "other sexps" in red star lines.

  2) Bullets work exactly as red stars. To understand the (many, many,
     many!) details, run this:


  3) The file emlua-repl.el contains test blocks. Elisp doesn't allow
     "real" multi-line comments, so using test blocks in elisp is
     tricky. See:

       (code-c-d "emlua" "/tmp/emlua/" :anchor)
       (find-emluafile "")
       (find-emlua "emlua-repl.el")
       (find-emlua "emlua-repl.el" "emlua-insert")
       (find-emlua "emlua-repl.el" "eepitch-emlua-fake1")
       (find-emlua "emlua-repl.el" "esend")
       (find-emlua "emlua-repl.el" "eepitch-emlua")

  4) `eepitch-emlua' pitches lines to something that is not a process
     running in buffer, and in order to do that it need to set up an
     alternative `eepitch-line'. A few functions in eev also do that -

       (find-eev "eepitch.el" "other-terms")

     but if anyone wants to learn how to do that I think that the
     examples in these two test blocks - and in the functions that
     they test - are especially clear...

       (find-emlua "emlua-repl.el" "emlua-insert")
       (find-emlua "emlua-repl.el" "eepitch-emlua-fake1")

     They don't call the Lua module, so they should be easy to test (I

Cheers and happy hacking,
  Eduardo Ochs

reply via email to

[Prev in Thread] Current Thread [Next in Thread]