summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2013-11-21 20:56:07 -0700
committerEric Schulte <schulte.eric@gmail.com>2013-11-21 20:59:07 -0700
commit336430f6e862efe99bca2efd747bb105f031b546 (patch)
tree0569815b32b8d34009e8881c900412d8dde522a7
parent97e8bc15e7c4537d5bd63b1c470b6326784fd9d6 (diff)
downloadorg-mode-336430f6e862efe99bca2efd747bb105f031b546.tar.gz
ox-bibtex handle missing ebib or bibtex2html
If ebib is missing then the jump function from org-bibtex-extras.el will be used if defined, else no jump function will be used. Only call `org-bibtex-process-bib-files' on html export so that ox-bibtex may be used for latex export without bibtex2html being installed.
-rw-r--r--contrib/lisp/ox-bibtex.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/lisp/ox-bibtex.el b/contrib/lisp/ox-bibtex.el
index 29a97eb..a0f8236 100644
--- a/contrib/lisp/ox-bibtex.el
+++ b/contrib/lisp/ox-bibtex.el
@@ -77,8 +77,8 @@
;; Initialization
(eval-when-compile (require 'cl))
-(org-add-link-type "cite" 'ebib)
-
+(let ((jump-fn (car (org-remove-if-not #'fboundp '(ebib obe-goto-citation)))))
+ (org-add-link-type "cite" jump-fn))
;;; Internal Functions
@@ -284,7 +284,8 @@ Return new parse tree. This function assumes current back-end is HTML."
(eval-after-load 'ox
'(add-to-list 'org-export-filter-parse-tree-functions
- 'org-bibtex-process-bib-files))
+ (lambda (e b i) (when (eql b 'html)
+ (org-bibtex-process-bib-files e b i)))))