diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2020-04-24 22:22:43 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2020-04-24 22:22:43 +0200 |
commit | 7cdc023f886707df06d7a5c5f8fbd69900e346c9 (patch) | |
tree | c762e80bf23e51a65575ddf0396d1fc3a4fea700 | |
parent | 178e47a0c5cdaae9f6b8e1b5329725e057fbfc58 (diff) | |
download | org-mode-7cdc023f886707df06d7a5c5f8fbd69900e346c9.tar.gz |
bibtex: Fix `org-bibtex-goto-citation'
* contrib/lisp/ox-bibtex.el (org-bibtex-goto-citation): Fix
`org-bibtex-goto-citation'.
Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://lists.gnu.org/r/emacs-orgmode/2020-04/msg00383.html>
-rw-r--r-- | contrib/lisp/ox-bibtex.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/contrib/lisp/ox-bibtex.el b/contrib/lisp/ox-bibtex.el index 47e2d5d..af8da6e 100644 --- a/contrib/lisp/ox-bibtex.el +++ b/contrib/lisp/ox-bibtex.el @@ -162,10 +162,8 @@ to `org-bibtex-citation-p' predicate." (let ((citation (or citation (completing-read "Citation: " (obe-citations))))) (find-file (or org-bibtex-file (error "`org-bibtex-file' has not been configured"))) - (goto-char (point-min)) - (when (re-search-forward (format " :CUSTOM_ID: %s" citation) nil t) - (outline-previous-visible-heading 1) - t))) + (let ((position (org-find-property "CUSTOM_ID" citation))) + (and position (progn (goto-char position) t))))) (let ((jump-fn (car (cl-remove-if-not #'fboundp '(ebib org-bibtex-goto-citation))))) (org-add-link-type "cite" jump-fn)) |