Merge branch 'maint'
This commit is contained in:
commit
cbe4cfc99a
|
@ -2800,7 +2800,7 @@ contextual information."
|
||||||
(defun org-e-html-final-function (contents backend info)
|
(defun org-e-html-final-function (contents backend info)
|
||||||
(if (not org-e-html-pretty-output) contents
|
(if (not org-e-html-pretty-output) contents
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(nxml-mode)
|
(html-mode)
|
||||||
(insert contents)
|
(insert contents)
|
||||||
(indent-region (point-min) (point-max))
|
(indent-region (point-min) (point-max))
|
||||||
(buffer-substring-no-properties (point-min) (point-max)))))
|
(buffer-substring-no-properties (point-min) (point-max)))))
|
||||||
|
|
|
@ -338,7 +338,7 @@ function can still decide about that independently."
|
||||||
"Update publishing timestamp for file FILENAME.
|
"Update publishing timestamp for file FILENAME.
|
||||||
If there is no timestamp, create one."
|
If there is no timestamp, create one."
|
||||||
(let ((key (org-publish-timestamp-filename filename pub-dir pub-func))
|
(let ((key (org-publish-timestamp-filename filename pub-dir pub-func))
|
||||||
(stamp (org-publish-cache-ctime-of-src filename base-dir)))
|
(stamp (org-publish-cache-ctime-of-src filename)))
|
||||||
(org-publish-cache-set key stamp)))
|
(org-publish-cache-set key stamp)))
|
||||||
|
|
||||||
(defun org-publish-remove-all-timestamps ()
|
(defun org-publish-remove-all-timestamps ()
|
||||||
|
@ -1128,12 +1128,12 @@ so that the file including them will be republished as well."
|
||||||
(while (re-search-forward "^#\\+include:[ \t]+\"\\([^\t\n\r\"]*\\)\"[ \t]*.*$" nil t)
|
(while (re-search-forward "^#\\+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-publish-cache-ctime-of-src included-file base-dir) t))))
|
(org-publish-cache-ctime-of-src included-file) t))))
|
||||||
;; FIXME don't kill current buffer
|
;; FIXME don't kill current buffer
|
||||||
(unless visiting (kill-buffer buf)))
|
(unless visiting (kill-buffer buf)))
|
||||||
(if (null pstamp)
|
(if (null pstamp)
|
||||||
t
|
t
|
||||||
(let ((ctime (org-publish-cache-ctime-of-src filename base-dir)))
|
(let ((ctime (org-publish-cache-ctime-of-src filename)))
|
||||||
(or (< pstamp ctime)
|
(or (< pstamp ctime)
|
||||||
(when included-files-ctime
|
(when included-files-ctime
|
||||||
(not (null (delq nil (mapcar (lambda(ct) (< ctime ct))
|
(not (null (delq nil (mapcar (lambda(ct) (< ctime ct))
|
||||||
|
@ -1188,10 +1188,11 @@ Returns value on success, else nil."
|
||||||
(error "`org-publish-cache-set' called, but no cache present"))
|
(error "`org-publish-cache-set' called, but no cache present"))
|
||||||
(puthash key value org-publish-cache))
|
(puthash key value org-publish-cache))
|
||||||
|
|
||||||
(defun org-publish-cache-ctime-of-src (f base-dir)
|
(defun org-publish-cache-ctime-of-src (file)
|
||||||
"Get the FILENAME ctime as an integer."
|
"Get the ctime of filename F as an integer."
|
||||||
(let ((attr (file-attributes
|
(let ((attr (file-attributes
|
||||||
(expand-file-name (or (file-symlink-p f) f) base-dir))))
|
(expand-file-name (or (file-symlink-p file) file)
|
||||||
|
(file-name-directory file)))))
|
||||||
(+ (lsh (car (nth 5 attr)) 16)
|
(+ (lsh (car (nth 5 attr)) 16)
|
||||||
(cadr (nth 5 attr)))))
|
(cadr (nth 5 attr)))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue