summaryrefslogtreecommitdiff
path: root/lisp/ox-publish.el
diff options
context:
space:
mode:
authorSébastien Delafond <sdelafond@gmail.com>2016-02-10 18:54:48 +0100
committerSébastien Delafond <sdelafond@gmail.com>2016-02-10 18:54:48 +0100
commit5b4347604ce1b4d25a87f6a83f75a4038a180d86 (patch)
tree87438ba3d21a30105d7d98427d322deccc9eccd3 /lisp/ox-publish.el
parentf083b1cce35adcd4dff9db99b033056401a203ba (diff)
parent8d8ea67656b95d8528b6cd9b43b2d53b847412b0 (diff)
Merge tag 'upstream/8.3.3'
Upstream version 8.3.3
Diffstat (limited to 'lisp/ox-publish.el')
-rw-r--r--lisp/ox-publish.el20
1 files changed, 13 insertions, 7 deletions
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index 20cacf9..2ec4137 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -1229,7 +1229,7 @@ If FREE-CACHE, empty the cache."
(setq org-publish-cache nil))
(defun org-publish-cache-file-needs-publishing
- (filename &optional pub-dir pub-func base-dir)
+ (filename &optional pub-dir pub-func base-dir)
"Check the timestamp of the last publishing of FILENAME.
Return non-nil if the file needs publishing. Also check if
any included files have been more recently published, so that
@@ -1250,12 +1250,18 @@ the file including them will be republished as well."
(while (re-search-forward "^[ \t]*#\\+INCLUDE:" nil t)
(let* ((element (org-element-at-point))
(included-file
- (and (eq (org-element-type element) 'keyword)
- (let ((value (org-element-property :value element)))
- (and value
- (string-match "^\\(\".+?\"\\|\\S-+\\)" value)
- (org-remove-double-quotes
- (match-string 1 value)))))))
+ (and (eq (org-element-type element) 'keyword)
+ (let ((value (org-element-property :value element)))
+ (and value
+ (string-match
+ "\\`\\(\".+?\"\\|\\S-+\\)\\(?:\\s-+\\|$\\)"
+ value)
+ (let ((m (match-string 1 value)))
+ (org-remove-double-quotes
+ ;; Ignore search suffix.
+ (if (string-match "\\(::\\(.*?\\)\\)\"?\\'" m)
+ (substring m 0 (match-beginning 0))
+ m))))))))
(when included-file
(add-to-list 'included-files-ctime
(org-publish-cache-ctime-of-src