0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 22:47:56 +00:00

Backport commit eba66c1ea from Emacs

* lisp/ox-publish.el (org-publish-sitemap):
Simplify and remove assumptions about timestamp format.

Don’t assume that current-time and plain encode-time return
timestamps in (HI LO US PS) format.

Remove some timestamp format assumptions
eba66c1eafeef6512259c9b46face2b03c7433b8
Paul Eggert
Fri Feb 22 13:31:01 2019 -0800
This commit is contained in:
Paul Eggert 2019-02-22 13:24:16 -08:00 committed by Kyle Meyer
parent 6b5695aabd
commit 1b15d5ef8e

View file

@ -793,13 +793,11 @@ Default for SITEMAP-FILENAME is `sitemap.org'."
(not (string-lessp B A))))))
((or `anti-chronologically `chronologically)
(let* ((adate (org-publish-find-date a project))
(bdate (org-publish-find-date b project))
(A (+ (ash (car adate) 16) (cadr adate)))
(B (+ (ash (car bdate) 16) (cadr bdate))))
(bdate (org-publish-find-date b project)))
(setq retval
(if (eq sort-files 'chronologically)
(<= A B)
(>= A B)))))
(not (if (eq sort-files 'chronologically)
(time-less-p bdate adate)
(time-less-p adate bdate))))))
(`nil nil)
(_ (user-error "Invalid sort value %s" sort-files)))
;; Directory-wise wins: