I want to write a Makefile that handles org-export with ox-bibtex, e.g.
%.pdf: %.org
emacs $< --batch -l emacs-load.el -f org-latex-export-to-pdf --kill
%.html: %.org
emacs $< --batch -l emacs-load.el -f org-html-export-to-html --kill
where emacs-load.el
contains any elisp needed.
And here start my problems: I so far have
(add-to-list 'exec-path "./bibtex2html-1.98-linux/")
(add-to-list 'load-path "./elisp")
(require 'org)
(load "ox-bibtex.el")
and the ox-bibtex.el copied to elisp
With the above configuration, I get
Symbol's function definition is void: org-element-insert-before
If I provide a function definition (i.e. from org-element.el) org-link-types is void, and so on.
Apparently, I am missing something, but as it stands I do not know what to do in order to make ox-bibtex work.
I want the Makefile to be fully portable (i.e. not depend on a custom emacs configuration) for org-version >= 8.0. (But its OK to require some files in the same directory or a subdirectory.)