summaryrefslogtreecommitdiff
path: root/lisp/org
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org')
-rw-r--r--lisp/org/org-agenda.el2
-rw-r--r--lisp/org/org-clock.el12
-rw-r--r--lisp/org/org-colview.el8
-rw-r--r--lisp/org/org-element.el4
-rw-r--r--lisp/org/org-habit.el4
-rw-r--r--lisp/org/org-indent.el4
-rw-r--r--lisp/org/org-timer.el14
-rw-r--r--lisp/org/org.el22
-rw-r--r--lisp/org/ox.el2
9 files changed, 34 insertions, 38 deletions
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index cf7a4dbf38b..49519471b38 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -10153,7 +10153,7 @@ to override `appt-message-warning-time'."
;; time and without date as argument, so it may pass wrong
;; information otherwise
(today (org-date-to-gregorian
- (time-to-days (current-time))))
+ (time-to-days nil)))
(org-agenda-restrict nil)
(files (org-agenda-files 'unrestricted)) entries file
(org-agenda-buffer nil))
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el
index 69e199ea27f..fd99c175013 100644
--- a/lisp/org/org-clock.el
+++ b/lisp/org/org-clock.el
@@ -950,7 +950,7 @@ If necessary, clock-out of the currently active clock."
(unless (org-is-active-clock clock)
(org-clock-clock-in clock t))))
- ((not (time-less-p resolve-to (current-time)))
+ ((not (time-less-p resolve-to nil))
(error "RESOLVE-TO must refer to a time in the past"))
(t
@@ -1052,7 +1052,7 @@ to be CLOCKED OUT."))))
(and (not (memq char-pressed '(?i ?q))) char-pressed)))))
(default
(floor (/ (float-time
- (time-subtract (current-time) last-valid)) 60)))
+ (time-subtract nil last-valid)) 60)))
(keep
(and (memq ch '(?k ?K))
(read-number "Keep how many minutes? " default)))
@@ -1089,8 +1089,7 @@ to be CLOCKED OUT."))))
(keep
(time-add last-valid (seconds-to-time (* 60 keep))))
(gotback
- (time-subtract (current-time)
- (seconds-to-time (* 60 gotback))))
+ (time-subtract nil (seconds-to-time (* 60 gotback))))
(t
(error "Unexpected, please report this as a bug")))
(and gotback last-valid)
@@ -1172,7 +1171,7 @@ so long."
org-clock-marker (marker-buffer org-clock-marker))
(let* ((org-clock-user-idle-seconds (org-user-idle-seconds))
(org-clock-user-idle-start
- (time-subtract (current-time)
+ (time-subtract nil
(seconds-to-time org-clock-user-idle-seconds)))
(org-clock-resolving-clocks-due-to-idleness t))
(if (> org-clock-user-idle-seconds (* 60 org-clock-idle-time))
@@ -1182,8 +1181,7 @@ so long."
(lambda (_)
(format "Clocked in & idle for %.1f mins"
(/ (float-time
- (time-subtract (current-time)
- org-clock-user-idle-start))
+ (time-subtract nil org-clock-user-idle-start))
60.0)))
org-clock-user-idle-start)))))
diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el
index eac29c50f65..80f4929b95c 100644
--- a/lisp/org/org-colview.el
+++ b/lisp/org/org-colview.el
@@ -540,7 +540,7 @@ Where possible, use the standard interface for changing this line."
(eol (line-end-position))
(pom (or (get-text-property bol 'org-hd-marker) (point)))
(key (or key (get-char-property (point) 'org-columns-key)))
- (org-columns--time (float-time (current-time)))
+ (org-columns--time (float-time))
(action
(pcase key
("CLOCKSUM"
@@ -790,7 +790,7 @@ When COLUMNS-FMT-STRING is non-nil, use it as the column format."
(org-columns-goto-top-level)
;; Initialize `org-columns-current-fmt' and
;; `org-columns-current-fmt-compiled'.
- (let ((org-columns--time (float-time (current-time))))
+ (let ((org-columns--time (float-time)))
(org-columns-get-format columns-fmt-string)
(unless org-columns-inhibit-recalculation (org-columns-compute-all))
(save-excursion
@@ -1182,7 +1182,7 @@ column specification."
"Compute all columns that have operators defined."
(org-with-silent-modifications
(remove-text-properties (point-min) (point-max) '(org-summaries t)))
- (let ((org-columns--time (float-time (current-time)))
+ (let ((org-columns--time (float-time))
seen)
(dolist (spec org-columns-current-fmt-compiled)
(let ((property (car spec)))
@@ -1494,7 +1494,7 @@ PARAMS is a property list of parameters:
(if (markerp org-columns-begin-marker)
(move-marker org-columns-begin-marker (point))
(setq org-columns-begin-marker (point-marker)))
- (let* ((org-columns--time (float-time (current-time)))
+ (let* ((org-columns--time (float-time))
(fmt
(cond
((bound-and-true-p org-agenda-overriding-columns-format))
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el
index f2b3002f1fd..73012cd2681 100644
--- a/lisp/org/org-element.el
+++ b/lisp/org/org-element.el
@@ -5067,7 +5067,7 @@ Assume ELEMENT belongs to cache and that a cache is active."
TIME-LIMIT is a time value or nil."
(and time-limit
(or (input-pending-p)
- (time-less-p time-limit (current-time)))))
+ (time-less-p time-limit nil))))
(defsubst org-element--cache-shift-positions (element offset &optional props)
"Shift ELEMENT properties relative to buffer positions by OFFSET.
@@ -5121,7 +5121,7 @@ updated before current modification are actually submitted."
(and next (aref next 0))
threshold
(and (not threshold)
- (time-add (current-time)
+ (time-add nil
org-element-cache-sync-duration))
future-change)
;; Request processed. Merge current and next offsets and
diff --git a/lisp/org/org-habit.el b/lisp/org/org-habit.el
index 89b75e6f680..c867c840b0e 100644
--- a/lisp/org/org-habit.el
+++ b/lisp/org/org-habit.el
@@ -288,7 +288,7 @@ Habits are assigned colors on the following basis:
(deadline (if scheduled-days
(+ scheduled-days (- d-repeat s-repeat))
(org-habit-deadline habit)))
- (m-days (or now-days (time-to-days (current-time)))))
+ (m-days (or now-days (time-to-days nil))))
(cond
((< m-days scheduled)
'(org-habit-clear-face . org-habit-clear-future-face))
@@ -406,7 +406,7 @@ current time."
"Insert consistency graph for any habitual tasks."
(let ((inhibit-read-only t)
(buffer-invisibility-spec '(org-link))
- (moment (time-subtract (current-time)
+ (moment (time-subtract nil
(list 0 (* 3600 org-extend-today-until) 0))))
(save-excursion
(goto-char (if line (point-at-bol) (point-min)))
diff --git a/lisp/org/org-indent.el b/lisp/org/org-indent.el
index b34586e09ec..35c1f22719e 100644
--- a/lisp/org/org-indent.el
+++ b/lisp/org/org-indent.el
@@ -325,7 +325,7 @@ stopped."
(let* ((case-fold-search t)
(limited-re (org-get-limited-outline-regexp))
(level (or (org-current-level) 0))
- (time-limit (and delay (time-add (current-time) delay))))
+ (time-limit (and delay (time-add nil delay))))
;; For each line, set `line-prefix' and `wrap-prefix'
;; properties depending on the type of line (headline, inline
;; task, item or other).
@@ -338,7 +338,7 @@ stopped."
;; In asynchronous mode, take a break of
;; `org-indent-agent-resume-delay' every DELAY to avoid
;; blocking any other idle timer or process output.
- ((and delay (time-less-p time-limit (current-time)))
+ ((and delay (time-less-p time-limit nil))
(setq org-indent-agent-resume-timer
(run-with-idle-timer
(time-add (current-idle-time) org-indent-agent-resume-delay)
diff --git a/lisp/org/org-timer.el b/lisp/org/org-timer.el
index 5acf526f183..7617a3810f9 100644
--- a/lisp/org/org-timer.el
+++ b/lisp/org/org-timer.el
@@ -144,7 +144,7 @@ the region 0:00:00."
;; Pass `current-time' result to `float-time' (instead
;; of calling without arguments) so that only
;; `current-time' has to be overridden in tests.
- (- (float-time (current-time)) delta))))
+ (- (float-time) delta))))
(setq org-timer-pause-time nil)
(org-timer-set-mode-line 'on)
(message "Timer start time set to %s, current value is %s"
@@ -168,12 +168,12 @@ With prefix arg STOP, stop it entirely."
(org-timer--run-countdown-timer
new-secs org-timer-countdown-timer-title))
(setq org-timer-start-time
- (time-add (current-time) (seconds-to-time new-secs))))
+ (time-add nil (seconds-to-time new-secs))))
(setq org-timer-start-time
;; Pass `current-time' result to `float-time' (instead
;; of calling without arguments) so that only
;; `current-time' has to be overridden in tests.
- (seconds-to-time (- (float-time (current-time))
+ (seconds-to-time (- (float-time)
(- pause-secs start-secs)))))
(setq org-timer-pause-time nil)
(org-timer-set-mode-line 'on)
@@ -238,8 +238,8 @@ it in the buffer."
;; overridden in tests.
(if org-timer-countdown-timer
(- (float-time org-timer-start-time)
- (float-time (or org-timer-pause-time (current-time))))
- (- (float-time (or org-timer-pause-time (current-time)))
+ (float-time org-timer-pause-time))
+ (- (float-time org-timer-pause-time)
(float-time org-timer-start-time))))
;;;###autoload
@@ -400,7 +400,7 @@ VALUE can be `on', `off', or `paused'."
(message "No timer set")
(let* ((rtime (decode-time
(time-subtract (timer--time org-timer-countdown-timer)
- (current-time))))
+ nil)))
(rsecs (nth 0 rtime))
(rmins (nth 1 rtime)))
(message "%d minute(s) %d seconds left before next time out"
@@ -464,7 +464,7 @@ using three `C-u' prefix arguments."
secs org-timer-countdown-timer-title))
(run-hooks 'org-timer-set-hook)
(setq org-timer-start-time
- (time-add (current-time) (seconds-to-time secs)))
+ (time-add nil (seconds-to-time secs)))
(setq org-timer-pause-time nil)
(org-timer-set-mode-line 'on))))))
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 35405b4bf81..569bc9f8ec1 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -227,7 +227,7 @@ file to byte-code before it is loaded."
(interactive "fFile to load: \nP")
(let* ((age (lambda (file)
(float-time
- (time-subtract (current-time)
+ (time-subtract nil
(nth 5 (or (file-attributes (file-truename file))
(file-attributes file)))))))
(base-name (file-name-sans-extension file))
@@ -5597,15 +5597,14 @@ the rounding returns a past time."
(apply 'encode-time
(append (list 0 (* r (floor (+ .5 (/ (float (nth 1 time)) r)))))
(nthcdr 2 time))))
- (if (and past (< (float-time (time-subtract (current-time) res)) 0))
+ (if (and past (< (float-time (time-subtract nil res)) 0))
(seconds-to-time (- (float-time res) (* r 60)))
res))))
(defun org-today ()
"Return today date, considering `org-extend-today-until'."
(time-to-days
- (time-subtract (current-time)
- (list 0 (* 3600 org-extend-today-until) 0))))
+ (time-subtract nil (list 0 (* 3600 org-extend-today-until) 0))))
;;;; Font-Lock stuff, including the activators
@@ -13057,8 +13056,7 @@ This function is run automatically after each state change to a DONE state."
(while (re-search-forward org-clock-line-re end t)
(when (org-at-clock-log-p) (throw :clock t))))))
(org-entry-put nil "LAST_REPEAT" (format-time-string
- (org-time-stamp-format t t)
- (current-time))))
+ (org-time-stamp-format t t))))
(when org-log-repeat
(if (or (memq 'org-add-log-note (default-value 'post-command-hook))
(memq 'org-add-log-note post-command-hook))
@@ -13117,7 +13115,7 @@ has been set"
(let ((nshiftmax 10)
(nshift 0))
(while (or (= nshift 0)
- (not (time-less-p (current-time) time)))
+ (not (time-less-p nil time)))
(when (= (cl-incf nshift) nshiftmax)
(or (y-or-n-p
(format "%d repeater intervals were not \
@@ -16904,7 +16902,7 @@ user."
;; overridden in tests.
(let ((org-def def)
(org-defdecode defdecode)
- (nowdecode (decode-time (current-time)))
+ (nowdecode (decode-time))
delta deltan deltaw deltadef year month day
hour minute second wday pm h2 m2 tl wday1
iso-year iso-weekday iso-week iso-date futurep kill-year)
@@ -17070,7 +17068,7 @@ user."
; (when (and org-read-date-prefer-future
; (not iso-year)
; (< (calendar-absolute-from-gregorian iso-date)
- ; (time-to-days (current-time))))
+ ; (time-to-days nil)))
; (setq year (1+ year)
; iso-date (calendar-gregorian-from-absolute
; (calendar-iso-to-absolute
@@ -17084,7 +17082,7 @@ user."
;; Pass `current-time' result to `decode-time' (instead of
;; calling without arguments) so that only `current-time' has
;; to be overridden in tests.
- (let ((now (decode-time (current-time))))
+ (let ((now (decode-time)))
(setq day (nth 3 now) month (nth 4 now) year (nth 5 now))))
(cond ((member deltaw '("d" "")) (setq day (+ day deltan)))
((equal deltaw "w") (setq day (+ day (* 7 deltan))))
@@ -17564,7 +17562,7 @@ signaled."
YEAR is expanded into one of the 30 next years, if possible, or
into a past one. Any year larger than 99 is returned unchanged."
(if (>= year 100) year
- (let* ((current (string-to-number (format-time-string "%Y" (current-time))))
+ (let* ((current (string-to-number (format-time-string "%Y")))
(century (/ current 100))
(offset (- year (% current 100))))
(cond ((> offset 30) (+ (* (1- century) 100) year))
@@ -18088,7 +18086,7 @@ A prefix ARG can be used to force the current date."
diff)
(when (or (org-at-timestamp-p 'lax)
(org-match-line (concat ".*" org-ts-regexp)))
- (let ((d1 (time-to-days (current-time)))
+ (let ((d1 (time-to-days nil))
(d2 (time-to-days (org-time-string-to-time (match-string 1)))))
(setq diff (- d2 d1))))
(calendar)
diff --git a/lisp/org/ox.el b/lisp/org/ox.el
index 1c43577cddf..820b1755624 100644
--- a/lisp/org/ox.el
+++ b/lisp/org/ox.el
@@ -3243,7 +3243,7 @@ locally for the subtree through node properties."
(let ((val (cond ((equal (car key) "DATE")
(or (cdr key)
(with-temp-buffer
- (org-insert-time-stamp (current-time)))))
+ (org-insert-time-stamp nil))))
((equal (car key) "TITLE")
(or (let ((visited-file
(buffer-file-name (buffer-base-buffer))))