[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 723af4afae 10/50: Backport commit 8ef37913d from Em
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 723af4afae 10/50: Backport commit 8ef37913d from Emacs |
Date: |
Tue, 4 Oct 2022 21:57:58 -0400 (EDT) |
branch: externals/org
commit 723af4afae847c7df817ca5a19c8a578e9f92395
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Kyle Meyer <kyle@kyleam.com>
Backport commit 8ef37913d from Emacs
* lisp/ol.el (org-store-link):
* lisp/org-clock.el (org-clock-sum)
(org-clock-update-time-maybe):
* lisp/org-colview.el (org-colview-construct-allowed-dates):
* lisp/org-macro.el (org-macro--vc-modified-time):
* lisp/org-macs.el (org-2ft, org-matcher-time):
* lisp/org-table.el (org-table-eval-formula):
* lisp/org.el (org-read-date, org-display-custom-time)
(org-time-string-to-time, org-timestamp-change):
Don’t assume Emacs 27 encode-time, since standalone Org still
works with Emacs 25 and it’s easier if we minimize differences
from standalone Org. Problem reported by Max Nikulin (Bug#54731).
This reverts much of 2021-12-16T17:40:21Z!eggert@cs.ucla.edu.
Port Org encode-time usage back to Emacs 25
8ef37913d3be5ff518018acb6b0144d6e559b5ba
Paul Eggert
Tue Apr 5 17:52:34 2022 -0700
[ km: See main's 8908a1bda (org-macs.el: Introduce a helper for
`encode-time', 2022-07-17). ]
---
lisp/ol.el | 2 +-
lisp/org-clock.el | 8 ++++----
lisp/org-colview.el | 2 +-
lisp/org-macro.el | 2 +-
lisp/org-macs.el | 4 ++--
lisp/org-table.el | 2 +-
lisp/org.el | 8 ++++----
7 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/lisp/ol.el b/lisp/ol.el
index ba4b3cb3de..f9816a187d 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -1575,7 +1575,7 @@ non-nil."
(setq link
(format-time-string
(car org-time-stamp-formats)
- (encode-time
+ (apply 'encode-time
(list 0 0 0 (nth 1 cd) (nth 0 cd) (nth 2 cd)
nil nil nil))))
(org-link-store-props :type "calendar" :date cd)))
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index ecbbb5322d..e0e6d478dc 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1904,11 +1904,11 @@ PROPNAME lets you set a custom text property instead of
:org-clock-minutes."
((match-end 2)
;; Two time stamps.
(let* ((ts (float-time
- (encode-time
+ (apply #'encode-time
(save-match-data
(org-parse-time-string (match-string 2))))))
(te (float-time
- (encode-time
+ (apply #'encode-time
(org-parse-time-string (match-string 3)))))
(dt (- (if tend (min te tend) te)
(if tstart (max ts tstart) ts))))
@@ -3042,9 +3042,9 @@ Otherwise, return nil."
(setq ts (match-string 1)
te (match-string 3))
(setq s (- (float-time
- (encode-time (org-parse-time-string te)))
+ (apply #'encode-time (org-parse-time-string te)))
(float-time
- (encode-time (org-parse-time-string ts))))
+ (apply #'encode-time (org-parse-time-string ts))))
neg (< s 0)
s (abs s)
h (floor (/ s 3600))
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 371889432d..829fcbbe3f 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -782,7 +782,7 @@ around it."
(setq time-after (copy-sequence time))
(setf (nth 3 time-before) (1- (nth 3 time)))
(setf (nth 3 time-after) (1+ (nth 3 time)))
- (mapcar (lambda (x) (format-time-string fmt (encode-time x)))
+ (mapcar (lambda (x) (format-time-string fmt (apply #'encode-time x)))
(list time-before time time-after)))))
(defun org-columns-open-link (&optional arg)
diff --git a/lisp/org-macro.el b/lisp/org-macro.el
index bb8a95065b..0921f3aa27 100644
--- a/lisp/org-macro.el
+++ b/lisp/org-macro.el
@@ -378,7 +378,7 @@ Return value as a string."
(buffer-substring
(point) (line-end-position)))))
(when (cl-some #'identity time)
- (setq date (encode-time time))))))))
+ (setq date (apply #'encode-time time))))))))
(let ((proc (get-buffer-process buf)))
(while (and proc (accept-process-output proc .5 nil t)))))
(kill-buffer buf))
diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 6f038f026b..b10725bd52 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -1185,7 +1185,7 @@ nil, just return 0."
((numberp s) s)
((stringp s)
(condition-case nil
- (float-time (encode-time (org-parse-time-string s)))
+ (float-time (apply #'encode-time (org-parse-time-string s)))
(error 0)))
(t 0)))
@@ -1252,7 +1252,7 @@ following special strings: \"<now>\", \"<today>\",
\"<tomorrow>\", and \"<yesterday>\".
Return 0. if S is not recognized as a valid value."
- (let ((today (float-time (encode-time
+ (let ((today (float-time (apply #'encode-time
(append '(0 0 0) (nthcdr 3 (decode-time)))))))
(save-match-data
(cond
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 13f060c7f8..c301bc6af1 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2606,7 +2606,7 @@ location of point."
(format-time-string
(org-time-stamp-format
(string-match-p "[0-9]\\{1,2\\}:[0-9]\\{2\\}" ts))
- (encode-time
+ (apply #'encode-time
(save-match-data (org-parse-time-string ts))))))
form t t))
diff --git a/lisp/org.el b/lisp/org.el
index 739b44b93f..bc4c83b7d9 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13987,7 +13987,7 @@ user."
(when (< (nth 2 org-defdecode) org-extend-today-until)
(setf (nth 2 org-defdecode) -1)
(setf (nth 1 org-defdecode) 59)
- (setq org-def (encode-time org-defdecode))
+ (setq org-def (apply #'encode-time org-defdecode))
(setq org-defdecode (decode-time org-def)))
(let* ((timestr (format-time-string
(if org-with-time "%Y-%m-%d %H:%M" "%Y-%m-%d")
@@ -14471,7 +14471,7 @@ The command returns the inserted time stamp."
time (org-fix-decoded-time t1)
str (org-add-props
(format-time-string
- (substring tf 1 -1) (encode-time time))
+ (substring tf 1 -1) (apply 'encode-time time))
nil 'mouse-face 'highlight))
(put-text-property beg end 'display str)))
@@ -14726,7 +14726,7 @@ days in order to avoid rounding problems."
(defun org-time-string-to-time (s)
"Convert timestamp string S into internal time."
- (encode-time (org-parse-time-string s)))
+ (apply #'encode-time (org-parse-time-string s)))
(defun org-time-string-to-seconds (s)
"Convert a timestamp string S into a number of seconds."
@@ -15166,7 +15166,7 @@ When SUPPRESS-TMP-DELAY is non-nil, suppress delays like
(setcar time0 (or (car time0) 0))
(setcar (nthcdr 1 time0) (or (nth 1 time0) 0))
(setcar (nthcdr 2 time0) (or (nth 2 time0) 0))
- (setq time (encode-time time0))))
+ (setq time (apply 'encode-time time0))))
;; Insert the new time-stamp, and ensure point stays in the same
;; category as before (i.e. not after the last position in that
;; category).
- [elpa] externals/org f99a8ea434 04/50: Backport commit 104e90d93 from Emacs, (continued)
- [elpa] externals/org f99a8ea434 04/50: Backport commit 104e90d93 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org c7e1bbfd1c 03/50: Backport commit 664094222 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 659646f135 07/50: Backport commit e0ca8f791 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 1a3dd6ec85 08/50: Backport commit 5f57b41aa from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 37bb3547c7 12/50: Backport commit fa1a7ac61 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org e74ea551bf 14/50: Backport commit cc8b6101f from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org c77692e8fb 22/50: Backport commit f94e93a6e from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 69ba7a20be 24/50: Backport commit 2a8d08360 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 1a2d2fd5e4 05/50: Backport commit c1145c31a from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org e7572fa86c 02/50: Backport commit 616dcf27e from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 723af4afae 10/50: Backport commit 8ef37913d from Emacs,
ELPA Syncer <=
- [elpa] externals/org 56ba22b9df 11/50: Backport commit 3abb3681b from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org c06dc10f39 13/50: Backport commit 2fba71cf1 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 5a81ec0018 15/50: Backport commit 253374f81 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org e58217ff1f 35/50: Backport commit 57259773b from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 772c44779c 06/50: Backport commit dd0727e1e from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 5d5a7832ec 09/50: Backport commit 18b680cfd from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 303c89350e 16/50: Backport commit 5b3d4e7bf from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 675ec6771f 23/50: Backport commit 9230953f2 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 1bbd86310a 31/50: Backport commit 4c1bc8315 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org add8552b1d 36/50: Backport commit 48aacbf29 from Emacs, ELPA Syncer, 2022/10/04