branch: externals/org commit db8f4ba130962f3bd156e4877b8826f8bf66f024 Author: Bastien Guerry <b...@gnu.org> Commit: Bastien Guerry <b...@gnu.org>
Use `org-time-stamp-rounding-minutes' * doc/org-manual.org (Creating Timestamps): Use `org-time-stamp-rounding-minutes' instead of `org-timestamp-rounding-minutes'. * lisp/org.el (org-current-time, org-read-date) (org-timestamp-change): Ditto. * lisp/org-clock.el (org-clock-rounding-minutes): Ditto. * lisp/org-agenda.el (org-agenda-date-later-minutes) (org-agenda-date-earlier-minutes): Ditto. Reported-by: <https://list.orgmode.org/87tt5ejpmq....@city17.xyz> --- doc/org-manual.org | 3 +-- lisp/org-agenda.el | 8 ++++---- lisp/org-clock.el | 2 +- lisp/org.el | 20 ++++++++++---------- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index d5d92b749d..efda58ecb8 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -6314,11 +6314,10 @@ format. #+kindex: C-u C-c . #+vindex: org-time-stamp-rounding-minutes - #+vindex: org-timestamp-rounding-minutes When called with a prefix argument, use the alternative format which contains date and time. The default time can be rounded to multiples of 5 minutes. See the option - ~org-timestamp-rounding-minutes~. + ~org-time-stamp-rounding-minutes~. #+kindex: C-u C-u C-c . With two prefix arguments, insert an active timestamp with the diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 187cacad42..7f0a6ee759 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -10134,15 +10134,15 @@ When called programmatically, FORCE-DIRECTION can be `set', `up', (org-agenda-date-later (- arg) what)) (defun org-agenda-date-later-minutes (arg) - "Change the time of this item, in units of `org-timestamp-rounding-minutes'." + "Change the time of this item, in units of `org-time-stamp-rounding-minutes'." (interactive "p") - (setq arg (* arg (cadr org-timestamp-rounding-minutes))) + (setq arg (* arg (cadr org-time-stamp-rounding-minutes))) (org-agenda-date-later arg 'minute)) (defun org-agenda-date-earlier-minutes (arg) - "Change the time of this item, in units of `org-timestamp-rounding-minutes'." + "Change the time of this item, in units of `org-time-stamp-rounding-minutes'." (interactive "p") - (setq arg (* arg (cadr org-timestamp-rounding-minutes))) + (setq arg (* arg (cadr org-time-stamp-rounding-minutes))) (org-agenda-date-earlier arg 'minute)) (defun org-agenda-date-later-hours (arg) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index efac5212a2..8b17523847 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -132,7 +132,7 @@ clocking out." "Rounding minutes when clocking in or out. The default value is 0 so that no rounding is done. When set to a non-integer value, use the car of -`org-timestamp-rounding-minutes', like for setting a timestamp. +`org-time-stamp-rounding-minutes', like for setting a timestamp. E.g. if `org-clock-rounding-minutes' is set to 5, time is 14:47 and you clock in: then the clock starts at 14:45. If you clock diff --git a/lisp/org.el b/lisp/org.el index dfcbe84ff9..174c4c8e54 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -2552,10 +2552,10 @@ of minutes to shift." (integer :tag "when modifying times"))) ;; Normalize old customizations of this variable. -(when (integerp org-timestamp-rounding-minutes) - (setq org-timestamp-rounding-minutes - (list org-timestamp-rounding-minutes - org-timestamp-rounding-minutes))) +(when (integerp org-time-stamp-rounding-minutes) + (setq org-time-stamp-rounding-minutes + (list org-time-stamp-rounding-minutes + org-time-stamp-rounding-minutes))) (defcustom org-display-custom-times nil "Non-nil means overlay custom formats over all time stamps. @@ -5240,10 +5240,10 @@ The following commands are available: (defun org-current-time (&optional rounding-minutes past) "Current time, possibly rounded to ROUNDING-MINUTES. When ROUNDING-MINUTES is not an integer, fall back on the car of -`org-timestamp-rounding-minutes'. When PAST is non-nil, ensure +`org-time-stamp-rounding-minutes'. When PAST is non-nil, ensure the rounding returns a past time." (let ((r (or (and (integerp rounding-minutes) rounding-minutes) - (car org-timestamp-rounding-minutes))) + (car org-time-stamp-rounding-minutes))) (now (current-time))) (if (< r 1) now @@ -14140,10 +14140,10 @@ the time/date that is used for everything that is not specified by the user." (require 'parse-time) (let* ((org-with-time with-time) - (org-timestamp-rounding-minutes + (org-time-stamp-rounding-minutes (if (equal org-with-time '(16)) '(0 0) - org-timestamp-rounding-minutes)) + org-time-stamp-rounding-minutes)) (ct (org-current-time)) (org-def (or org-overriding-default-time default-time ct)) (org-defdecode (decode-time org-def)) @@ -15386,7 +15386,7 @@ The date is changed by N times WHAT. WHAT can be `day', `month', position in the timestamp determines what is changed. When optional argument UPDOWN is non-nil, minutes are rounded -according to `org-timestamp-rounding-minutes'. +according to `org-time-stamp-rounding-minutes'. When SUPPRESS-TMP-DELAY is non-nil, suppress delays like \"--2d\"." @@ -15394,7 +15394,7 @@ When SUPPRESS-TMP-DELAY is non-nil, suppress delays like (timestamp? (org-at-timestamp-p 'lax)) origin-cat with-hm inactive - (dm (max (nth 1 org-timestamp-rounding-minutes) 1)) + (dm (max (nth 1 org-time-stamp-rounding-minutes) 1)) extra rem ts time time0 fixnext clrgx) (unless timestamp? (user-error "Not at a timestamp"))