eev
[Top][All Lists]
Advanced

[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
  Link: https://github.com/edrx/emlua#introduction

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

       https://github.com/edrx/emlua#testing-everything

     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:

       (find-red-star-links)

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

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


Cheers and happy hacking,
  Eduardo Ochs
  http://angg.twu.net/#eev



reply via email to

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