ob-elixir
ob-elixir copied to clipboard
Org-Mode Elixir language support
DEPRECATED!!!
Please, see https://github.com/zweifisch/ob-elixir for a more complete and up-to-date solution that is also published to MELPA.
ob-elixir
Org-Mode Elixir language support
This is a simple implementation of Elixir support for code blocks in org-mode.
- Org-Babel
Babel provides what is known as literate programming to org-mode. The documentation is broad and can be found [[http://orgmode.org/org.html#Working-With-Source-Code][here]].
- Requirements
This is only tested on Emacs 24. You must have installed:
- [[http://www.erlang.org/][Erlang]] (check [[https://www.erlang-solutions.com/downloads/download-erlang-otp][here]])
- [[http://elixir-lang.org/][Elixir]] (check [[http://elixir-lang.org/install.html][here]])
- elixir-mode (check [[https://github.com/elixir-lang/emacs-elixir][here]])
- Usage
Clone repository and put ob-elixir.el in your Emacs load path.
** Clone:
#+BEGIN_SRC sh git clone https://github.com/victorolinasc/ob-elixir.git #+END_SRC
** Put in path Add ob-elixir.el to your load path. Example:
#+BEGIN_SRC elisp (add-to-list 'load-path "~/.emacs.d/lisp/") #+END_SRC
Then copy file ob-elixir.el to "~/.emacs.d/lisp"
** Configure Babel
Then you need to configure babel support in org-mode. Add this to your configuration:
#+BEGIN_SRC elisp (require 'ob-elixir)
;; example of adding languages to babel (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) (sh . t) (elixir . t) (org . t) (ditaa . t))) #+END_SRC
Then source code blocks can be interpreted in org-mode.
- Future work
- Persistent sessions -- could be backed by emacs comint or distel style distributed erlang.
- Avoid having to call IO.inspect to return a value.
- Parsing reader values
- Optionally cleanup .exs file
- Publish to MELPA, MARMELADE?