diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-05-07 00:57:22 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-05-07 00:57:22 +0200 |
commit | e42c1611094a689f77f09cc66c5a50fb1e3ac7bb (patch) | |
tree | 38ea0eb37f998f6b4e8ee3a923002ca9d0ad325f | |
parent | 29e33ae2af23186aafbe638f7805dab79b5b925d (diff) | |
download | org-mode-e42c1611094a689f77f09cc66c5a50fb1e3ac7bb.tar.gz |
ox-publish: Throw an error for external reference outside of publish
* lisp/ox-publish.el (org-publish-resolve-external-link): Throw an
error when trying to resolve an external reference while not in
a publishing process.
Reported-by: Rainer M Krug <Rainer@krugs.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97420>
-rw-r--r-- | lisp/ox-publish.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el index d03ca79..ff61559 100644 --- a/lisp/ox-publish.el +++ b/lisp/ox-publish.el @@ -1144,6 +1144,11 @@ This function allows to resolve external links like: [[file.org::*fuzzy][description]] [[file.org::#custom-id][description]] [[file.org::fuzzy][description]]" + (unless org-publish-cache + (user-error + "Reference \"%s\" in file \"%s\" cannot be resolved without publishing" + search + file)) (let ((references (org-publish-cache-get-file-property (expand-file-name file) :references nil t))) (cond |