diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2010-07-22 11:45:04 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2010-07-22 11:45:04 +0200 |
commit | dd484300d30ce6f814f7705634090139cff33564 (patch) | |
tree | d91fce0bccc8f91ac98311c312f3c1281a3e6f51 | |
parent | 1e48ae4259e0b4a18da53da17006d182c7c4650f (diff) | |
download | org-mode-dd484300d30ce6f814f7705634090139cff33564.tar.gz |
Publish: Better error messages if important information is missing
* lisp/org-publish.el (org-publish-file): Better error message if
base-directory or publishing-directory are not defined.
-rw-r--r-- | lisp/org-publish.el | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/lisp/org-publish.el b/lisp/org-publish.el index ce5e8e1..6324eba 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -92,7 +92,8 @@ Most properties are optional, but some should always be set: :base-directory Directory containing publishing source files :base-extension Extension (without the dot!) of source files. - This can be a regular expression. + This can be a regular expression. If not given, + \"org\" will be used as default extension. :publishing-directory Directory (possibly remote) where output files will be published @@ -589,10 +590,18 @@ See `org-publish-projects'." (publishing-function (or (plist-get project-plist :publishing-function) 'org-publish-org-to-html)) - (base-dir (file-name-as-directory - (file-truename (plist-get project-plist :base-directory)))) - (pub-dir (file-name-as-directory - (file-truename (plist-get project-plist :publishing-directory)))) + (base-dir + (file-name-as-directory + (file-truename + (or (plist-get project-plist :base-directory) + (error "Project %s does not have :base-directory defined" + (car project)))))) + (pub-dir + (file-name-as-directory + (file-truename + (or (plist-get project-plist :publishing-directory) + (error "Project %s does not have :publishing-directory defined" + (car project)))))) tmp-pub-dir) (unless no-cache |