diff options
author | Bastien Guerry <bzg@altern.org> | 2011-07-06 19:21:50 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2011-07-06 19:21:50 +0200 |
commit | 382e69ee6c73c7b621b8705beb177c4fb4514330 (patch) | |
tree | 45deda9aa90df017f6c11c39375c1417c3861643 | |
parent | 7a88eaec295d50a6e27cc1d6b6f1a725ace01076 (diff) | |
download | org-mode-382e69ee6c73c7b621b8705beb177c4fb4514330.tar.gz |
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.
-rw-r--r-- | lisp/org-publish.el | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/org-publish.el b/lisp/org-publish.el index fd07911..6995817 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -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 - (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)))) + (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))))) (if (null pstamp) t (let ((ctime (org-publish-cache-ctime-of-src filename))) |