summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2013-11-21 20:54:59 -0700
committerEric Schulte <schulte.eric@gmail.com>2013-11-21 20:54:59 -0700
commit4547be972ad44a143511f8b0fa343c4286c0a4ad (patch)
tree802614fcf6262934272309c31c8eb97f5d71f17a
parent7b938d8c2c627a76172d472c60c01a8c31e4a3d6 (diff)
downloadorg-mode-4547be972ad44a143511f8b0fa343c4286c0a4ad.tar.gz
raise useful error when obe-bibtex-file isn't set
-rw-r--r--contrib/lisp/org-bibtex-extras.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/lisp/org-bibtex-extras.el b/contrib/lisp/org-bibtex-extras.el
index 3b2ad88..d9a623f 100644
--- a/contrib/lisp/org-bibtex-extras.el
+++ b/contrib/lisp/org-bibtex-extras.el
@@ -75,7 +75,8 @@ For example, to point to your `obe-bibtex-file' use the following.
"Return all citations from `obe-bibtex-file'."
(or obe-citations
(save-window-excursion
- (find-file obe-bibtex-file)
+ (find-file (or obe-bibtex-file
+ (error "`obe-bibtex-file' has not been configured")))
(goto-char (point-min))
(while (re-search-forward " :CUSTOM_ID: \\(.+\\)$" nil t)
(push (org-no-properties (match-string 1))
@@ -88,7 +89,8 @@ For example, to point to your `obe-bibtex-file' use the following.
(let ((citation (or citation
(org-icompleting-read "Citation: "
(obe-citations)))))
- (find-file obe-bibtex-file)
+ (find-file (or obe-bibtex-file
+ (error "`obe-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)