Prechádzať zdrojové kódy

Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode

Conflicts:

	ORGWEBPAGE/Changes.org
Carsten Dominik 17 rokov pred
rodič
commit
578865ebdc
2 zmenil súbory, kde vykonal 7 pridanie a 1 odobranie
  1. 3 0
      ChangeLog
  2. 4 1
      org-publish.el

+ 3 - 0
ChangeLog

@@ -1,5 +1,8 @@
 2008-03-10  Bastien Guerry  <bzg@altern.org>
 
+	* 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)

+ 4 - 1
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))