diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-10-14 12:39:07 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-10-14 12:39:07 +0200 |
commit | 606b5fdd8795593a455184c929f311bf3ca263a2 (patch) | |
tree | 9b9c892d3a3d7c4e1b1a98e218a978bfbed431ea | |
parent | fa61cb40799fc3de59e227983485af99b7d4b8d4 (diff) | |
download | org-mode-606b5fdd8795593a455184c929f311bf3ca263a2.tar.gz |
ox-publish: Fix void-variable project-plist
* lisp/ox-publish.el (org-publish-projects): Fix bug introduced in
346d227.
-rw-r--r-- | lisp/ox-publish.el | 65 |
1 files changed, 33 insertions, 32 deletions
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el index adadea1..9284553 100644 --- a/lisp/ox-publish.el +++ b/lisp/ox-publish.el @@ -671,42 +671,43 @@ See `org-publish-projects'." (defun org-publish-projects (projects) "Publish all files belonging to the PROJECTS alist. If `:auto-sitemap' is set, publish the sitemap too. If -`:makeindex' is set, also produce a file theindex.org." +`:makeindex' is set, also produce a file \"theindex.org\"." (dolist (project (org-publish-expand-projects projects)) - (let ((preparation-function - (plist-get project-plist :preparation-function))) - (when preparation-function (run-hooks 'preparation-function))) - ;; Each project uses its own cache file. - (org-publish-initialize-cache (car project)) - (let* ((project-plist (cdr project)) - (exclude-regexp (plist-get project-plist :exclude)) - (sitemap-p (plist-get project-plist :auto-sitemap)) - (sitemap-filename (or (plist-get project-plist :sitemap-filename) - "sitemap.org")) - (sitemap-function (or (plist-get project-plist :sitemap-function) - 'org-publish-org-sitemap)) - (org-publish-sitemap-date-format - (or (plist-get project-plist :sitemap-date-format) - org-publish-sitemap-date-format)) - (org-publish-sitemap-file-entry-format - (or (plist-get project-plist :sitemap-file-entry-format) - org-publish-sitemap-file-entry-format)) - (files (org-publish-get-base-files project exclude-regexp)) - (theindex - (expand-file-name "theindex.org" - (plist-get project-plist :base-directory)))) - (when sitemap-p (funcall sitemap-function project sitemap-filename)) + (let ((project-plist (cdr project))) + (let ((preparation-function + (plist-get project-plist :preparation-function))) + (when preparation-function (run-hooks 'preparation-function))) + ;; Each project uses its own cache file. + (org-publish-initialize-cache (car project)) + (when (plist-get project-plist :auto-sitemap) + (let ((sitemap-filename + (or (plist-get project-plist :sitemap-filename) + "sitemap.org")) + (sitemap-function + (or (plist-get project-plist :sitemap-function) + #'org-publish-org-sitemap)) + (org-publish-sitemap-date-format + (or (plist-get project-plist :sitemap-date-format) + org-publish-sitemap-date-format)) + (org-publish-sitemap-file-entry-format + (or (plist-get project-plist :sitemap-file-entry-format) + org-publish-sitemap-file-entry-format))) + (funcall sitemap-function project sitemap-filename))) ;; Publish all files from PROJECT excepted "theindex.org". Its ;; publishing will be deferred until "theindex.inc" is ;; populated. - (dolist (file files) - (unless (equal file theindex) (org-publish-file file project t))) - ;; Populate "theindex.inc", if needed, and publish - ;; "theindex.org". - (when (plist-get project-plist :makeindex) - (org-publish-index-generate-theindex - project (plist-get project-plist :base-directory)) - (org-publish-file theindex project t)) + (let ((theindex + (expand-file-name "theindex.org" + (plist-get project-plist :base-directory))) + (exclude-regexp (plist-get project-plist :exclude))) + (dolist (file (org-publish-get-base-files project exclude-regexp)) + (unless (equal file theindex) (org-publish-file file project t))) + ;; Populate "theindex.inc", if needed, and publish + ;; "theindex.org". + (when (plist-get project-plist :makeindex) + (org-publish-index-generate-theindex + project (plist-get project-plist :base-directory)) + (org-publish-file theindex project t))) (let ((completion-function (plist-get project-plist :completion-function))) (when completion-function (run-hooks 'completion-function))) |