org-publish.el: fix bug in `org-publish-cache-file-needs-publishing'.

* install/git/org-mode/lisp/org-publish.el
(org-publish-cache-file-needs-publishing): only check against .org
files.
This commit is contained in:
Bastien Guerry 2011-07-06 19:21:50 +02:00
parent 7a88eaec29
commit 382e69ee6c

View file

@ -1105,12 +1105,13 @@ so that the file including them will be republished as well."
(pstamp (org-publish-cache-get key))
included-files-ctime)
(with-temp-buffer
(when (equal (file-name-extension filename) "org")
(find-file (expand-file-name filename))
(goto-char (point-min))
(while (re-search-forward "^#\\+INCLUDE: \\(.+\\)[ ^\t]*$" nil t)
(let* ((included-file (expand-file-name (match-string 1))))
(add-to-list 'included-files-ctime
(org-publish-cache-ctime-of-src included-file) t))))
(org-publish-cache-ctime-of-src included-file) t)))))
(if (null pstamp)
t
(let ((ctime (org-publish-cache-ctime-of-src filename)))