summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-03-17 09:32:21 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-03-17 09:32:21 +0100
commit9227445899813312e85c69c5485f5bc1486a8b43 (patch)
tree29ce779112b379e8d460e0dced440d3daaa7509e
parent147b4646d217bd284f6c02949bf7e067f38cb53e (diff)
downloadorg-mode-9227445899813312e85c69c5485f5bc1486a8b43.tar.gz
ox-publish: Raise an error on undefined components (take 2)
* lisp/ox-publish.el (org-publish-expand-projects): Raise an error on undefined components.
-rw-r--r--lisp/ox-publish.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index 44f8097..7c91783 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -418,8 +418,12 @@ This splices all the components into the list."
(while (setq p (pop rest))
(if (setq components (plist-get (cdr p) :components))
(setq rest (append
- (mapcar (lambda (x) (assoc x org-publish-project-alist))
- components)
+ (mapcar
+ (lambda (x)
+ (or (assoc x org-publish-project-alist)
+ (user-error "Unknown component %S in project %S"
+ x (car p))))
+ components)
rest))
(push p rtn)))
(nreverse (delete-dups (delq nil rtn)))))