blob f33090ecc96a7e91111917aeea9b438f528a9b83 1059 bytes (raw)
name: contrib/lisp/ob-lua.el # note: path name is non-authoritative(*)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
| | ;;; ob-lua.el --- Execute Lua code within org-mode blocks.
;; Copyright 2016 stardiviner
;; Author: stardiviner <numbchild@gmail.com>
;; Maintainer: stardiviner <numbchild@gmail.com>
;; Keywords: org babel lua
;; URL: https://github.com/stardiviner/ob-lua
;; Created: 12th April 2016
;; Version: 0.0.1
;; Package-Requires: ((org "8"))
;;; Commentary:
;;
;; Execute Lua code within org-mode blocks.
;;; Code:
(require 'org)
(require 'ob)
(defgroup ob-lua nil
"org-mode blocks for Lua."
:group 'org)
(defcustom ob-lua:default-session "*lua*"
"Default Lua session.
It is lua inferior process from `run-lua'."
:group 'ob-lua
:type 'string)
;;;###autoload
(defun org-babel-execute:lua (body params)
"org-babel lua hook."
(let* ((session (or (cdr (assoc :session params))
ob-lua:default-session))
(cmd (mapconcat 'identity (list "lua -") " ")))
(org-babel-eval cmd body)))
;;;###autoload
(eval-after-load "org"
'(add-to-list 'org-src-lang-modes '("lua" . lua)))
(provide 'ob-lua)
;;; ob-lua.el ends here
|
debug log:
solving f33090e ...
found f33090e in https://git.savannah.gnu.org/cgit/emacs.git
(*) Git path names are given by the tree(s) the blob belongs to.
Blobs themselves have no identifier aside from the hash of its contents.^
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.