1. Justin Sheehy
  2. riak


riak / orgbatch.el

;; setup erlang mode
(let ((tp (shell-command-to-string "erl -noinput -eval \"io:format(\\\"~s\\\", [code:lib_dir(tools)])\" -run init stop")))
  (setq load-path (cons (concat tp "/emacs")
  (require 'erlang-start))

;; Org-mode
;; specify ORG_PATH if you have org-mode installed somewhere
;; other than your site-lisp path
(let ((orgpath (getenv "ORG_PATH")))
  (if (stringp orgpath)
      (setq load-path
            (cons (concat orgpath "/lisp")
                  (cons (concat orgpath "/contrib/lisp")
(require 'org-install)
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))

;; allow css to set code highlighting style
(setq org-export-htmlize-output-type 'css)

;; command-line --eval functions
(defun riak-export-doc-file (filename format)
  (find-file filename)
  (cond ((eq format 'ascii) (org-export-as-ascii 3))
        ((eq format 'html) (org-export-as-html 3))
        (message "Unknown export format")))

(defun riak-export-doc-dir (directory format)
   (lambda (filename) (riak-export-doc-file filename format))
   (file-expand-wildcards (concat directory "/*.org"))))