Organic.el is a command line interface for Emacs Org-mode. It is implemented as a Emacs Lisp script that processes Org-mode files specified in the command line. Currently it provides an ability to export, publish and execute Org-mode files.
The following commands convert the README file to the supported formats.
org init # init packages in build directory
org export -o latex -O pdf README.org # export to PDF
org export -o latex README.org # export to LaTeX
org export -o odt README.org # export to ODT
org export -o md README.org # export to Markdown
org export -o html README.org # export to HTML
org export -o txt README.org # export to plain text
Organic.el uses repository-local configuration to fetch the packages and
configure Emacs. File .org/packages.el
contains package-agnostic
configuration and is used to list packages that are required to build and export
your Org-mode file. Here is an example (and the default) file.
; list the packages you want
(setq package-list '(org org-plus-contrib org-ref htmlize gnuplot))
; list the repositories containing them
(setq package-archives '(("elpa" . "https://tromey.com/elpa/")
("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")
("org" . "https://orgmode.org/elpa/")))
File .org/config.el
contains Org-mode specific configuration that is
used to tune build and export options. This repository contains
a rather long example of it. In this file you can also define your
own conversion functions. Here is the default function that converts
from LaTeX to PDF.
(defun org-export/latex->pdf (file build-directory)
(message
(shell-command-to-string
(mapconcat
'identity
(list "env max_print_line=1000 texfot --no-stderr --quiet"
"latexmk -8bit -interaction=nonstopmode -pdf -xelatex -bibtex -shell-escape"
(concat "-output-directory=" build-directory)
"-f" file)
" ")))
(delete-file file))