Nick Dokos <nicholas.do...@hp.com> writes: > Eric S Fraga <e.fr...@ucl.ac.uk> wrote: > >> Hi, >> >> I notice that there has been a recent commit which affects export of org >> files. I have just needed to export an org file to HTML and get the >> following error: >> >> : if: Symbol's value as variable is void: backend >> >> The backtrace is: >> >> ,---- >> | Debugger entered--Lisp error: (void-variable backend) >> | (eq backend (quote html)) >> | (if (eq backend (quote html)) (progn (org-exp-bibtex-docites [...] >> | (when (eq backend (quote html)) (org-exp-bibtex-docites [...] >> | (save-window-excursion (setq oebp-cite-plist [...] >> | org-export-bibtex-preprocess() >> | run-hooks(org-export-preprocess-hook) >> | org-export-preprocess-string( [...] ) >> | org-export-as-html(nil) >> | call-interactively(org-export-as-html) >> | org-export(nil) >> | call-interactively(org-export nil nil) >> `---- >> >> For now, I am going to disable the invocation of the bibtex >> preprocessing as this appears to be the only place that =backend= >> appears. >> > > It's likely that the only thing needed is to rename backend to > org-export-current-backend in contrib/lisp/org-exp-bibtex.el. > See commit 99675ffead44e32f4959909a657b88831fe33703. > > Nick
Bastien et al., A patch that seems to fix the problem is attached.
diff --git a/contrib/lisp/org-exp-bibtex.el b/contrib/lisp/org-exp-bibtex.el index de3d662..9d2569f 100644 --- a/contrib/lisp/org-exp-bibtex.el +++ b/contrib/lisp/org-exp-bibtex.el @@ -72,7 +72,7 @@ (opt (org-exp-bibtex-options-to-plist (match-string 3)))) (replace-match (cond - ((eq backend 'html) ;; We are exporting to HTML + ((eq org-export-current-backend 'html) ;; We are exporting to HTML (let (extra-args cite-list end-hook tmp-files) (dolist (elt opt) (when (equal "option" (car elt)) @@ -106,12 +106,12 @@ (while (re-search-forward "<hr>" nil t) (replace-match "<hr/>" t t)) (concat "\n#+BEGIN_HTML\n<div id=\"bibliography\">\n" (buffer-string) "\n</div>\n#+END_HTML\n")))) - ((eq backend 'latex) ;; Latex export + ((eq org-export-current-backend 'latex) ;; Latex export (concat "\n#+LATEX: \\bibliographystyle{" style "}" "\n#+LATEX: \\bibliography{" file "}\n"))) t t))) ;; Convert cites to links in html - (when (eq backend 'html) + (when (eq org-export-current-backend 'html) ;; Split citation commands with multiple keys (org-exp-bibtex-docites (lambda () @@ -130,7 +130,7 @@ (save-excursion (save-match-data (goto-char (point-min)) - (when (eq backend 'html) + (when (eq org-export-current-backend 'html) (while (re-search-forward "\\\\cite{\\([^}\n]+\\)}" nil t) (apply fun nil))))))
-- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.4 (release_7.4.576.g99675.dirty)
_______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode