From 336430f6e862efe99bca2efd747bb105f031b546 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Thu, 21 Nov 2013 20:56:07 -0700 Subject: [PATCH] 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. --- contrib/lisp/ox-bibtex.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/lisp/ox-bibtex.el b/contrib/lisp/ox-bibtex.el index 29a97ebea..a0f823609 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)))))