diff --git a/ChangeLog b/ChangeLog index 5ad49dc9c..12fe15694 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-03-10 Bastien Guerry + * org-publish.el (org-publish-file): Send an error when file is + not part of any project. + * org.el (org-select-remember-template): Cleaned the code. * org-publish.el (org-publish-before-export-hook) diff --git a/org-publish.el b/org-publish.el index 0385a3774..09110061d 100644 --- a/org-publish.el +++ b/org-publish.el @@ -516,7 +516,10 @@ FILENAME is the filename of the file to be published." (defun org-publish-file (filename &optional project) "Publish file FILENAME from PROJECT." (when (org-publish-needed-p filename) - (let* ((project (or project (org-publish-get-project-from-filename filename))) + (let* ((project (or project + (or (org-publish-get-project-from-filename filename) + (error "File %s is not part of any known project" + filename)))) (project-plist (cdr project)) (publishing-function (or (plist-get project-plist :publishing-function) 'org-publish-org-to-html))