From 5ab59625e66062d09c2349557dc565a676badf78 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 18 May 2012 11:48:15 +0200 Subject: [PATCH] org-e-publish: Apply #+INCLUDE keyword regexp change * contrib/lisp/org-e-publish.el (org-e-publish-cache-file-needs-publishing): Make quotes mandatory around the file name and allow spaces in it. --- contrib/lisp/org-e-publish.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/contrib/lisp/org-e-publish.el b/contrib/lisp/org-e-publish.el index 92e58f929..1920abff8 100644 --- a/contrib/lisp/org-e-publish.el +++ b/contrib/lisp/org-e-publish.el @@ -1119,13 +1119,14 @@ If FREE-CACHE, empty the cache." (defun org-e-publish-cache-file-needs-publishing (filename &optional pub-dir pub-func) "Check the timestamp of the last publishing of FILENAME. -Return `t', if the file needs publishing. The function also -checks if any included files have been more recently published, -so that the file including them will be republished as well." +Non-nil if the file needs publishing. The function also checks +if any included files have been more recently published, so that +the file including them will be republished as well." (unless org-e-publish-cache (error "`org-e-publish-cache-file-needs-publishing' called, but no cache present")) - (let* ((key (org-e-publish-timestamp-filename filename pub-dir pub-func)) + (let* ((case-fold-search t) + (key (org-e-publish-timestamp-filename filename pub-dir pub-func)) (pstamp (org-e-publish-cache-get key)) (visiting (find-buffer-visiting filename)) included-files-ctime buf) @@ -1135,7 +1136,7 @@ so that the file including them will be republished as well." (with-current-buffer buf (goto-char (point-min)) (while (re-search-forward - "^#\\+INCLUDE:[ \t]+\"?\\([^ \t\n\r\"]*\\)\"?[ \t]*.*$" nil t) + "^#\\+INCLUDE:[ \t]+\"\\([^\t\n\r\"]*\\)\"[ \t]*.*$" nil t) (let* ((included-file (expand-file-name (match-string 1)))) (add-to-list 'included-files-ctime (org-e-publish-cache-ctime-of-src included-file) t))))