diff options
| author | Paul Eggert | 2019-02-22 13:24:16 -0800 |
|---|---|---|
| committer | Paul Eggert | 2019-02-22 13:31:01 -0800 |
| commit | eba66c1eafeef6512259c9b46face2b03c7433b8 (patch) | |
| tree | 0945a1e684448ba37146dbd36cd71dc91d70dad2 /lisp/org | |
| parent | 0613e7a38efc3b0534e0ca5c5fa401e2a3bda906 (diff) | |
| download | emacs-eba66c1eafeef6512259c9b46face2b03c7433b8.tar.gz emacs-eba66c1eafeef6512259c9b46face2b03c7433b8.zip | |
Remove some timestamp format assumptions
Don’t assume that current-time and plain encode-time return
timestamps in (HI LO US PS) format.
* lisp/gnus/gnus-art.el (article-make-date-line)
(article-lapsed-string):
* lisp/gnus/gnus-demon.el (gnus-demon-time-to-step):
* lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
* lisp/gnus/nnmaildir.el (nnmaildir-request-expire-articles):
* lisp/net/pop3.el (pop3-uidl-dele):
* lisp/org/ox-publish.el (org-publish-sitemap):
* lisp/vc/vc-hg.el (vc-hg-state-fast):
Simplify and remove assumptions about timestamp format.
* lisp/gnus/gnus-art.el (article-lapsed-string):
* lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
Do not worry about time-subtract returning nil; that's not possible.
* lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
Avoid race due to duplicate current-time calls.
* lisp/vc/vc-hg.el (vc-hg--time-to-integer): Remove; no longer used.
Diffstat (limited to 'lisp/org')
| -rw-r--r-- | lisp/org/ox-publish.el | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lisp/org/ox-publish.el b/lisp/org/ox-publish.el index cd49cd0afc5..bc86a4d5635 100644 --- a/lisp/org/ox-publish.el +++ b/lisp/org/ox-publish.el | |||
| @@ -793,13 +793,11 @@ Default for SITEMAP-FILENAME is `sitemap.org'." | |||
| 793 | (not (string-lessp B A)))))) | 793 | (not (string-lessp B A)))))) |
| 794 | ((or `anti-chronologically `chronologically) | 794 | ((or `anti-chronologically `chronologically) |
| 795 | (let* ((adate (org-publish-find-date a project)) | 795 | (let* ((adate (org-publish-find-date a project)) |
| 796 | (bdate (org-publish-find-date b project)) | 796 | (bdate (org-publish-find-date b project))) |
| 797 | (A (+ (ash (car adate) 16) (cadr adate))) | ||
| 798 | (B (+ (ash (car bdate) 16) (cadr bdate)))) | ||
| 799 | (setq retval | 797 | (setq retval |
| 800 | (if (eq sort-files 'chronologically) | 798 | (not (if (eq sort-files 'chronologically) |
| 801 | (<= A B) | 799 | (time-less-p bdate adate) |
| 802 | (>= A B))))) | 800 | (time-less-p adate bdate)))))) |
| 803 | (`nil nil) | 801 | (`nil nil) |
| 804 | (_ (user-error "Invalid sort value %s" sort-files))) | 802 | (_ (user-error "Invalid sort value %s" sort-files))) |
| 805 | ;; Directory-wise wins: | 803 | ;; Directory-wise wins: |