summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2008-11-25 10:56:37 +0100
committerCarsten Dominik <carsten.dominik@gmail.com>2008-11-25 10:56:37 +0100
commit8e31f6f99c683c73b0252361ad8e0e1809fa69a5 (patch)
treece8937b937708e01abf8a8d4b1512688e9408f4d
parent4e4bdf364690b85f35175bd9b9d49abfb7e396bf (diff)
downloadorg-mode-8e31f6f99c683c73b0252361ad8e0e1809fa69a5.tar.gz
Fix publishing of component files.
When starting the publishing process with `org-publish-current-project' from a file that is located in a project that is also a component of a parent project, this patch now makes sure that the entire parent project is published instead.
-rw-r--r--doc/ChangeLog14
-rw-r--r--doc/org.texi3
-rwxr-xr-xlisp/ChangeLog2
-rw-r--r--lisp/org-publish.el5
4 files changed, 22 insertions, 2 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 6ab2256..d9e2368 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,17 @@
+2008-11-25 Carsten Dominik <carsten.dominik@gmail.com>
+
+ * org.texi (Project alist): Add info about the publishing sequence
+ of components.
+
+
+
+
+
+
+
+
+
+
2008-11-24 Carsten Dominik <carsten.dominik@gmail.com>
* org.texi: Re-apply the change to FDL 1.3.
diff --git a/doc/org.texi b/doc/org.texi
index 8f2620a..83a49b8 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -8049,7 +8049,8 @@ a project takes the second form listed above, the individual members
of the ``components'' property are taken to be components of the
project, which group together files requiring different publishing
options. When you publish such a ``meta-project'' all the components
-will also publish.
+will also publish. The @code{:components} are published in the sequence
+provided.
@node Sources and destinations, Selecting files, Project alist, Configuration
@subsection Sources and destinations for files
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f8492cb..eff72d8 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -2,6 +2,8 @@
* org-publish.el (org-publish-org-index): Only exclude the index
file in the main directory from being added to the site-map.
+ (org-publish-get-project-from-filename): If the current project is
+ a component, start publishing from the parent project.
2008-11-24 Carsten Dominik <carsten.dominik@gmail.com>
diff --git a/lisp/org-publish.el b/lisp/org-publish.el
index ba79efb..f272d17 100644
--- a/lisp/org-publish.el
+++ b/lisp/org-publish.el
@@ -470,7 +470,10 @@ matching filenames."
(defun org-publish-get-project-from-filename (filename)
"Return the project FILENAME belongs."
(let* ((project-name (cdr (assoc (expand-file-name filename)
- org-publish-files-alist))))
+ org-publish-files-alist))))
+ (dolist (prj org-publish-project-alist)
+ (if (member project-name (plist-get (cdr prj) :components))
+ (setq project-name (car prj))))
(assoc project-name org-publish-project-alist)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;