diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-02-22 13:24:16 -0800 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2019-03-03 22:25:22 -0500 |
commit | 1b15d5ef8e5237582fde1b7230d148f31aa8fde2 (patch) | |
tree | 417baf77a96063f0d0d2fe97a0500670df3ddc10 | |
parent | 6b5695aabd365b34495c6388e0125c3fd7e34e27 (diff) | |
download | org-mode-1b15d5ef8e5237582fde1b7230d148f31aa8fde2.tar.gz |
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
-rw-r--r-- | lisp/ox-publish.el | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el index 8eb6d6c..38488a1 100644 --- a/lisp/ox-publish.el +++ b/lisp/ox-publish.el @@ -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: |