3

I am not sure what's the difference between elisp and emacs-lisp. In my environment, both work for elisp code but I did not found elisp from the load language list:

#+BEGIN_SRC elisp :results output
(print org-babel-load-languages)
#+END_SRC

#+RESULTS:
: 
: ((emacs-lisp . t) (python . t) (ipython . t) (plantuml . t) (dot . t) (calc . t) (C . t) (latex . t) (sqlite . t) (java . t) (shell . t))
  • 2
    Elisp is Emacs Lisp. The preferred name is apparently Emacs Lisp, but the menu item in Info for the manual is named Elisp. – Drew Jul 27 '17 at 19:53
4

This works because the function org-babel-execute:elisp exists. Looking at the help for that function shows

org-babel-execute:elisp is an alias for ‘org-babel-execute:emacs-lisp’ in ‘ob-emacs-lisp.el’.

(org-babel-execute:elisp BODY PARAMS)

Execute a block of emacs-lisp code with Babel.

So emacs-lisp is the "real" name and elisp is just a convenient shorthand. You could make more such shortcuts using defalias. For example to have "py" source blocks instead of "python" use

(defalias 'org-babel-execute:py 'org-babel-execute:python)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.