forked from mirrors/org-mode
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.
This commit is contained in:
parent
507b3c937b
commit
5ab59625e6
|
@ -1119,13 +1119,14 @@ If FREE-CACHE, empty the cache."
|
||||||
(defun org-e-publish-cache-file-needs-publishing
|
(defun org-e-publish-cache-file-needs-publishing
|
||||||
(filename &optional pub-dir pub-func)
|
(filename &optional pub-dir pub-func)
|
||||||
"Check the timestamp of the last publishing of FILENAME.
|
"Check the timestamp of the last publishing of FILENAME.
|
||||||
Return `t', if the file needs publishing. The function also
|
Non-nil if the file needs publishing. The function also checks
|
||||||
checks if any included files have been more recently published,
|
if any included files have been more recently published, so that
|
||||||
so that the file including them will be republished as well."
|
the file including them will be republished as well."
|
||||||
(unless org-e-publish-cache
|
(unless org-e-publish-cache
|
||||||
(error
|
(error
|
||||||
"`org-e-publish-cache-file-needs-publishing' called, but no cache present"))
|
"`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))
|
(pstamp (org-e-publish-cache-get key))
|
||||||
(visiting (find-buffer-visiting filename))
|
(visiting (find-buffer-visiting filename))
|
||||||
included-files-ctime buf)
|
included-files-ctime buf)
|
||||||
|
@ -1135,7 +1136,7 @@ so that the file including them will be republished as well."
|
||||||
(with-current-buffer buf
|
(with-current-buffer buf
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward
|
(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))))
|
(let* ((included-file (expand-file-name (match-string 1))))
|
||||||
(add-to-list 'included-files-ctime
|
(add-to-list 'included-files-ctime
|
||||||
(org-e-publish-cache-ctime-of-src included-file) t))))
|
(org-e-publish-cache-ctime-of-src included-file) t))))
|
||||||
|
|
Loading…
Reference in a new issue