summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-03-17 09:30:38 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-03-17 09:30:38 +0100
commit147b4646d217bd284f6c02949bf7e067f38cb53e (patch)
tree6b2fad31e3ec344f1be023137d01ca51e2436463
parent72fc2d3928533d37fbfbe1ae3a74b28c0a132093 (diff)
downloadorg-mode-147b4646d217bd284f6c02949bf7e067f38cb53e.tar.gz
Revert "ox-publish: Raise an error when encountering undefined component"
This reverts commit 6e1d174d0a5564f3c18570025a439cbd201290cb.
-rw-r--r--lisp/ox-publish.el21
1 files changed, 10 insertions, 11 deletions
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index adcfd21..44f8097 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -413,17 +413,16 @@ project base directory."
(defun org-publish-expand-projects (projects-alist)
"Expand projects in PROJECTS-ALIST.
-This splices all the components into a list."
- (delete-dups
- (cl-mapcan (lambda (project)
- (pcase-let ((`(,name . ,properties) project))
- (cl-mapcan (lambda (component)
- (or
- (assoc component org-publish-project-alist)
- (user-error "Unknown component %S in project %S"
- component name)))
- (plist-get properties :components))))
- projects-alist)))
+This splices all the components into the list."
+ (let ((rest projects-alist) rtn p components)
+ (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)
+ rest))
+ (push p rtn)))
+ (nreverse (delete-dups (delq nil rtn)))))
(defun org-publish-get-base-files (project)
"Return a list of all files in PROJECT."