Prefer "timestamp" over "time-stamp"

* lisp/org.el (org-time-stamp-formats):
(org-timestamp-formats):
(org-time-stamp-rounding-minutes):
(org-timestamp-rounding-minutes):
(org-time-stamp-custom-formats):
(org-timestamp-custom-formats):
(org-time-stamp):
(org-timestamp):
(org-time-stamp-inactive):
(org-timestamp-inactive):
(org-insert-time-stamp):
(org-insert-timestamp):
(org-toggle-time-stamp-overlays):
(org-toggle-timestamp-overlays):
(org-time-stamp-to-now):
(org-timestamp-to-now):
* lisp/ox.el (org-export-time-stamp-file):
(org-export-timestamp-file): Rename using "timestamp" term, keeping
the old name as alias.
* doc/org-manual.org: Update all the uses, adding #+findex and
 #+vindex entries.  Keep the alias names for searchability.

Adjust all the callers.

The following "time-stamp" uses are unchanged:
1. `org-time-stamp-format' where obsolete and _different_ function
   `org-timestamp-format' still exists.
2. :time-stamp-file property in export INFO plist.  Changing this
   would be breaking.
3. ORG-NEWS remains unchanged.
This commit is contained in:
Ihor Radchenko 2023-04-30 13:37:51 +02:00
parent eb6cabdee5
commit 989cc51499
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
23 changed files with 198 additions and 181 deletions

View File

@ -6022,10 +6022,11 @@ format. All commands listed below produce timestamps in the correct
format.
#+attr_texinfo: :sep ,
- {{{kbd(C-c .)}}} (~org-time-stamp~) ::
- {{{kbd(C-c .)}}} (~org-timestamp~) ::
#+kindex: C-c .
#+findex: org-time-stamp
#+findex: org-timestamp
Prompt for a date and insert a corresponding timestamp. When point
is at an existing timestamp in the buffer, the command is used to
modify this timestamp instead of inserting a new one. When this
@ -6033,21 +6034,23 @@ 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-time-stamp-rounding-minutes~.
~org-timestamp-rounding-minutes~.
#+kindex: C-u C-u C-c .
With two prefix arguments, insert an active timestamp with the
current time without prompting.
- {{{kbd(C-c !)}}} (~org-time-stamp-inactive~) ::
- {{{kbd(C-c !)}}} (~org-timestamp-inactive~) ::
#+kindex: C-c !
#+kindex: C-u C-c !
#+kindex: C-u C-u C-c !
#+findex: org-time-stamp-inactive
#+findex: org-timestamp-inactive
Like {{{kbd(C-c .)}}}, but insert an inactive timestamp that does
not cause an agenda entry.
@ -6251,16 +6254,18 @@ turn off the display with ~org-read-date-display-live~.].
#+vindex: org-display-custom-times
#+vindex: org-time-stamp-custom-formats
#+vindex: org-timestamp-custom-formats
Org mode uses the standard ISO notation for dates and times as it is
defined in ISO 8601. If you cannot get used to this and require
another representation of date and time to keep you happy, you can get
it by customizing the variables ~org-display-custom-times~ and
~org-time-stamp-custom-formats~.
~org-timestamp-custom-formats~.
- {{{kbd(C-c C-x C-t)}}} (~org-toggle-time-stamp-overlays~) ::
- {{{kbd(C-c C-x C-t)}}} (~org-toggle-timestamp-overlays~) ::
#+kindex: C-c C-x C-t
#+findex: org-toggle-time-stamp-overlays
#+findex: org-toggle-timestamp-overlays
Toggle the display of custom formats for dates and times.
Org mode needs the default format for scanning, so the custom
@ -11846,7 +11851,7 @@ global variables, include:
#+cindex: @samp{DATE}, keyword
#+vindex: org-export-date-timestamp-format
A date or a time-stamp[fn:: The variable
A date or a timestamp[fn:: The variable
~org-export-date-timestamp-format~ defines how this timestamp are
exported.].
@ -12077,8 +12082,9 @@ following arguments.
- ~timestamp~ ::
#+vindex: org-export-time-stamp-file
#+vindex: org-export-timestamp-file
Toggle inclusion of the creation time in the exported file
(~org-export-time-stamp-file~).
(~org-export-timestamp-file~).
- ~title~ ::
@ -20073,7 +20079,7 @@ changes.
#+vindex: org-time-stamp-overlay-formats
To turn on custom format overlays over timestamps (variables
~org-put-time-stamp-overlays~ and
~org-time-stamp-overlay-formats~), use:
~org-timestamp-overlay-formats~), use:
| =customtime= | Overlay custom time format. |
@ -21471,7 +21477,7 @@ Org provides a special hook to further limit items in agenda views:
~agenda~, ~agenda*~[fn:: The ~agenda*~ view is the same as ~agenda~
except that it only considers /appointments/, i.e., scheduled and
deadline items that have a time specification =[h]h:mm= in their
time-stamps.], ~todo~, ~alltodo~, ~tags~, ~tags-todo~, ~tags-tree~.
timestamps.], ~todo~, ~alltodo~, ~tags~, ~tags-todo~, ~tags-tree~.
Specify a custom function that tests inclusion of every matched item
in the view. This function can also skip as much as is needed.
@ -22603,7 +22609,7 @@ only set this in the global options section, not in the section of an
individual block.
[fn:34] /Planned/ means here that these entries have some planning
information attached to them, like a time-stamp, a scheduled or
information attached to them, like a timestamp, a scheduled or
a deadline string. See ~org-agenda-entry-types~ on how to set what
planning information is taken into account.

View File

@ -1342,7 +1342,7 @@ When set to the symbol `next' only the first future repeat is shown."
When nil, display SCHEDULED and DEADLINE dates at their base
date, and in today's agenda, as a reminder. Display plain
time-stamps, on the other hand, at every repeat date in the past
timestamps, on the other hand, at every repeat date in the past
in addition to the base date.
When non-nil, show a repeated entry at its latest repeat date,
@ -5708,7 +5708,7 @@ and the timestamp type relevant for the sorting strategy in
This function is invoked if `org-agenda-todo-ignore-deadlines',
`org-agenda-todo-ignore-scheduled' or
`org-agenda-todo-ignore-timestamp' is set to an integer."
(let ((days (org-time-stamp-to-now
(let ((days (org-timestamp-to-now
time org-agenda-todo-ignore-time-comparison-use-seconds)))
(if (>= n 0)
(>= days n)
@ -5730,13 +5730,13 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
(re-search-forward org-scheduled-time-regexp end t)
(cond
((eq org-agenda-todo-ignore-scheduled 'future)
(> (org-time-stamp-to-now
(> (org-timestamp-to-now
(match-string 1) org-agenda-todo-ignore-time-comparison-use-seconds)
0))
((eq org-agenda-todo-ignore-scheduled 'past)
(<= (org-time-stamp-to-now
(match-string 1) org-agenda-todo-ignore-time-comparison-use-seconds)
0))
(<= (org-timestamp-to-now
(match-string 1) org-agenda-todo-ignore-time-comparison-use-seconds)
0))
((numberp org-agenda-todo-ignore-scheduled)
(org-agenda-todo-custom-ignore-p
(match-string 1) org-agenda-todo-ignore-scheduled))
@ -5748,13 +5748,13 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
((eq org-agenda-todo-ignore-deadlines 'far)
(not (org-deadline-close-p (match-string 1))))
((eq org-agenda-todo-ignore-deadlines 'future)
(> (org-time-stamp-to-now
(> (org-timestamp-to-now
(match-string 1) org-agenda-todo-ignore-time-comparison-use-seconds)
0))
((eq org-agenda-todo-ignore-deadlines 'past)
(<= (org-time-stamp-to-now
(match-string 1) org-agenda-todo-ignore-time-comparison-use-seconds)
0))
(<= (org-timestamp-to-now
(match-string 1) org-agenda-todo-ignore-time-comparison-use-seconds)
0))
((numberp org-agenda-todo-ignore-deadlines)
(org-agenda-todo-custom-ignore-p
(match-string 1) org-agenda-todo-ignore-deadlines))
@ -5777,13 +5777,13 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
(when (re-search-forward org-ts-regexp nil t)
(cond
((eq org-agenda-todo-ignore-timestamp 'future)
(> (org-time-stamp-to-now
(> (org-timestamp-to-now
(match-string 1) org-agenda-todo-ignore-time-comparison-use-seconds)
0))
((eq org-agenda-todo-ignore-timestamp 'past)
(<= (org-time-stamp-to-now
(match-string 1) org-agenda-todo-ignore-time-comparison-use-seconds)
0))
(<= (org-timestamp-to-now
(match-string 1) org-agenda-todo-ignore-time-comparison-use-seconds)
0))
((numberp org-agenda-todo-ignore-timestamp)
(org-agenda-todo-custom-ignore-p
(match-string 1) org-agenda-todo-ignore-timestamp))
@ -5809,8 +5809,8 @@ displayed in agenda view."
(let ((m (get-text-property 0 'org-hd-marker d)))
(and m (marker-position m))))
deadlines))
;; Match time-stamps set to current date, time-stamps with
;; a repeater, and S-exp time-stamps.
;; Match timestamps set to current date, timestamps with
;; a repeater, and S-exp timestamps.
(regexp
(concat
(if org-agenda-include-inactive-timestamps "[[<]" "<")
@ -5827,7 +5827,7 @@ displayed in agenda view."
(goto-char (point-min))
(while (re-search-forward regexp nil t)
;; Skip date ranges, scheduled and deadlines, which are handled
;; specially. Also skip time-stamps before first headline as
;; specially. Also skip timestamps before first headline as
;; there would be no entry to add to the agenda. Eventually,
;; ignore clock entries.
(catch :skip
@ -5843,11 +5843,11 @@ displayed in agenda view."
(let* ((pos (match-beginning 0))
(repeat (match-string 1))
(sexp-entry (match-string 3))
(time-stamp (if (or repeat sexp-entry) (match-string 0)
(save-excursion
(goto-char pos)
(looking-at org-ts-regexp-both)
(match-string 0))))
(timestamp (if (or repeat sexp-entry) (match-string 0)
(save-excursion
(goto-char pos)
(looking-at org-ts-regexp-both)
(match-string 0))))
(todo-state (org-get-todo-state))
(warntime (get-text-property (point) 'org-appt-warntime))
(done? (member todo-state org-done-keywords)))
@ -5892,7 +5892,7 @@ displayed in agenda view."
(throw :skip nil))))
(save-excursion
(re-search-backward org-outline-regexp-bol nil t)
;; Possibly skip time-stamp when a deadline is set.
;; Possibly skip timestamp when a deadline is set.
(when (and org-agenda-skip-timestamp-if-deadline-is-shown
(assq (point) deadline-position-alist))
(throw :skip nil))
@ -5920,7 +5920,7 @@ displayed in agenda view."
(org-add-props head nil
'effort effort
'effort-minutes effort-minutes)
level category tags time-stamp org-ts-regexp habit?)))
level category tags timestamp org-ts-regexp habit?)))
(org-add-props item props
'urgency (if habit?
(org-habit-get-urgency (org-habit-parse-todo))
@ -10392,15 +10392,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-time-stamp-rounding-minutes'."
"Change the time of this item, in units of `org-timestamp-rounding-minutes'."
(interactive "p")
(setq arg (* arg (cadr org-time-stamp-rounding-minutes)))
(setq arg (* arg (cadr org-timestamp-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-time-stamp-rounding-minutes'."
"Change the time of this item, in units of `org-timestamp-rounding-minutes'."
(interactive "p")
(setq arg (* arg (cadr org-time-stamp-rounding-minutes)))
(setq arg (* arg (cadr org-timestamp-rounding-minutes)))
(org-agenda-date-earlier arg 'minute))
(defun org-agenda-date-later-hours (arg)
@ -10438,7 +10438,7 @@ When called programmatically, FORCE-DIRECTION can be `set', `up',
(defun org-agenda-date-prompt (arg)
"Change the date of this item. Date is prompted for, with default today.
The prefix ARG is passed to the `org-time-stamp' command and can therefore
The prefix ARG is passed to the `org-timestamp' command and can therefore
be used to request time specification in the time stamp."
(interactive "P")
(org-agenda-check-type t 'agenda)
@ -10454,7 +10454,7 @@ be used to request time specification in the time stamp."
(widen)
(goto-char pos)
(unless (org-at-timestamp-p 'lax) (error "Cannot find time stamp"))
(org-time-stamp arg (equal (char-after (match-beginning 0)) ?\[)))
(org-timestamp arg (equal (char-after (match-beginning 0)) ?\[)))
(org-agenda-show-new-time marker org-last-changed-timestamp))
(message "Time stamp changed to %s" org-last-changed-timestamp))))
@ -10682,9 +10682,9 @@ the resulting entry will not be shown. When TEXT is empty, switch to
(require 'org-datetree)
(org-datetree-find-date-create d1)
(org-agenda-insert-diary-make-new-entry text))
(org-insert-time-stamp (org-time-from-absolute
(calendar-absolute-from-gregorian d1))
nil nil nil nil time2))
(org-insert-timestamp (org-time-from-absolute
(calendar-absolute-from-gregorian d1))
nil nil nil nil time2))
(end-of-line 0))
((block) ;; Wrap this in (strictly unnecessary) parens because
;; otherwise the indentation gets confused by the
@ -10697,11 +10697,11 @@ the resulting entry will not be shown. When TEXT is empty, switch to
(require 'org-datetree)
(org-datetree-find-date-create d1)
(org-agenda-insert-diary-make-new-entry text))
(org-insert-time-stamp (org-time-from-absolute
(calendar-absolute-from-gregorian d1)))
(org-insert-timestamp (org-time-from-absolute
(calendar-absolute-from-gregorian d1)))
(insert "--")
(org-insert-time-stamp (org-time-from-absolute
(calendar-absolute-from-gregorian d2)))
(org-insert-timestamp (org-time-from-absolute
(calendar-absolute-from-gregorian d2)))
(end-of-line 0)))
(if (string-match "\\S-" text)
(progn

View File

@ -524,12 +524,12 @@ When TAG is non-nil, don't move trees, but mark them with the ARCHIVE tag."
(let (ts)
(and (re-search-forward org-ts-regexp end t)
(setq ts (match-string 0))
(< (org-time-stamp-to-now ts) 0)
(< (org-timestamp-to-now ts) 0)
(if (not (looking-at
(concat "--\\(" org-ts-regexp "\\)")))
(concat "--\\(" org-ts-regexp "\\)")))
(concat "old timestamp " ts)
(setq ts (concat "old timestamp " ts (match-string 0)))
(and (< (org-time-stamp-to-now (match-string 1)) 0)
(and (< (org-timestamp-to-now (match-string 1)) 0)
ts)))))
tag))

View File

@ -1858,7 +1858,7 @@ Expansion occurs in a temporary Org mode buffer."
(let* ((upcase? (equal (upcase key) key))
(org-end-time-was-given nil)
(time (org-read-date upcase? t nil prompt)))
(org-insert-time-stamp
(org-insert-timestamp
time (or org-time-was-given upcase?)
(member key '("u" "U"))
nil nil (list org-end-time-was-given))))

View File

@ -128,7 +128,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-time-stamp-rounding-minutes', like for setting a time-stamp.
`org-timestamp-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
@ -1441,8 +1441,8 @@ the default behavior."
leftover)
start-time
(org-current-time org-clock-rounding-minutes t)))
(setq ts (org-insert-time-stamp org-clock-start-time
'with-hm 'inactive))
(setq ts (org-insert-timestamp org-clock-start-time
'with-hm 'inactive))
(org-indent-line)))
(move-marker org-clock-marker (point) (buffer-base-buffer))
(move-marker org-clock-hd-marker
@ -1722,7 +1722,7 @@ to, overriding the existing value of `org-clock-out-switch-to-state'."
(delete-region (point) (line-end-position))
(org-fold-core-ignore-modifications
(insert-and-inherit "--")
(setq te (org-insert-time-stamp (or at-time now) 'with-hm 'inactive))
(setq te (org-insert-timestamp (or at-time now) 'with-hm 'inactive))
(setq s (org-time-convert-to-integer
(time-subtract
(org-time-string-to-time te)

View File

@ -1130,7 +1130,7 @@ This function updates `org-columns-current-fmt-compiled'."
(defun org-columns--age-to-minutes (s)
"Turn age string S into a number of minutes.
An age is either computed from a given time-stamp, or indicated
An age is either computed from a given timestamp, or indicated
as a canonical duration, i.e., using units defined in
`org-duration-canonical-units'."
(cond

View File

@ -414,7 +414,7 @@ Counting starts at 1."
'completing-read "9.0")
(define-obsolete-function-alias 'org-iread-file-name 'read-file-name "9.0")
(define-obsolete-function-alias 'org-days-to-time
'org-time-stamp-to-now "8.2")
'org-timestamp-to-now "8.2")
(define-obsolete-variable-alias 'org-agenda-ignore-drawer-properties
'org-agenda-ignore-properties "9.0")
(define-obsolete-function-alias 'org-preview-latex-fragment

View File

@ -222,7 +222,7 @@ inserted into the buffer."
(save-excursion
(insert "\n")
(org-indent-line)
(org-insert-time-stamp
(org-insert-timestamp
(org-encode-time 0 0 0 day month year)
nil
(eq org-datetree-add-timestamp 'inactive))))

View File

@ -3995,7 +3995,7 @@ Assume point is at the beginning of the timestamp."
day-start (nth 3 date)
hour-start (nth 2 date)
minute-start (nth 1 date))))
;; Compute date-end. It can be provided directly in time-stamp,
;; Compute date-end. It can be provided directly in timestamp,
;; or extracted from time range. Otherwise, it defaults to the
;; same values as date-start.
(unless diaryp

View File

@ -190,8 +190,8 @@
(declare-function org-table-sum "org" (&optional beg end nlast))
(declare-function org-table-toggle-coordinate-overlays "org" ())
(declare-function org-table-toggle-formula-debugger "org" ())
(declare-function org-time-stamp "org" (arg &optional inactive))
(declare-function org-time-stamp-inactive "org" (&optional arg))
(declare-function org-timestamp "org" (arg &optional inactive))
(declare-function org-timestamp-inactive "org" (&optional arg))
(declare-function org-timer "org" (&optional restart no-insert))
(declare-function org-timer-item "org" (&optional arg))
(declare-function org-timer-pause-or-continue "org" (&optional stop))
@ -210,7 +210,7 @@
(declare-function org-toggle-ordered-property "org" ())
(declare-function org-toggle-pretty-entities "org" ())
(declare-function org-toggle-tags-groups "org" ())
(declare-function org-toggle-time-stamp-overlays "org" ())
(declare-function org-toggle-timestamp-overlays "org" ())
(declare-function org-transpose-element "org" ())
(declare-function org-transpose-words "org" ())
(declare-function org-tree-to-indirect-buffer "org" (&optional arg))
@ -594,8 +594,8 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
(org-defkey org-mode-map (kbd "C-c %") #'org-mark-ring-push)
(org-defkey org-mode-map (kbd "C-c &") #'org-mark-ring-goto)
(org-defkey org-mode-map (kbd "C-c C-z") #'org-add-note) ;alternative binding
(org-defkey org-mode-map (kbd "C-c .") #'org-time-stamp) ;minor-mode reserved
(org-defkey org-mode-map (kbd "C-c !") #'org-time-stamp-inactive) ;minor-mode r.
(org-defkey org-mode-map (kbd "C-c .") #'org-timestamp) ;minor-mode reserved
(org-defkey org-mode-map (kbd "C-c !") #'org-timestamp-inactive) ;minor-mode r.
(org-defkey org-mode-map (kbd "C-c ,") #'org-priority) ;minor-mode reserved
(org-defkey org-mode-map (kbd "C-c C-y") #'org-evaluate-time-range)
(org-defkey org-mode-map (kbd "C-c >") #'org-goto-calendar)
@ -639,7 +639,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
(org-defkey org-mode-map (kbd "C-c C-x C-w") #'org-cut-special)
(org-defkey org-mode-map (kbd "C-c C-x M-w") #'org-copy-special)
(org-defkey org-mode-map (kbd "C-c C-x C-y") #'org-paste-special)
(org-defkey org-mode-map (kbd "C-c C-x C-t") #'org-toggle-time-stamp-overlays)
(org-defkey org-mode-map (kbd "C-c C-x C-t") #'org-toggle-timestamp-overlays)
(org-defkey org-mode-map (kbd "C-c C-x C-i") #'org-clock-in)
(org-defkey org-mode-map (kbd "C-c C-x C-x") #'org-clock-in-last)
(org-defkey org-mode-map (kbd "C-c C-x C-z") #'org-resolve-clocks)

View File

@ -2408,7 +2408,7 @@ subtree, ignoring planning line and any drawer following it."
(setq lim-down (copy-marker limit))))
((org-at-heading-p)
;; On a heading, start at first item after drawers and
;; time-stamps (scheduled, etc.).
;; timestamps (scheduled, etc.).
(let ((limit (save-excursion (outline-next-heading) (point))))
(org-end-of-meta-data t)
(if (org-list-search-forward (org-item-beginning-re) limit t)

View File

@ -488,7 +488,7 @@ error when the user input is empty."
(allow-empty? nil)
(t (user-error "Empty input is not valid")))))
(declare-function org-time-stamp-inactive "org" (&optional arg))
(declare-function org-timestamp-inactive "org" (&optional arg))
(defun org-completing-read (&rest args)
"Completing-read with SPACE being a normal character."
@ -498,7 +498,7 @@ error when the user input is empty."
(define-key minibuffer-local-completion-map " " #'self-insert-command)
(define-key minibuffer-local-completion-map "?" #'self-insert-command)
(define-key minibuffer-local-completion-map (kbd "C-c !")
#'org-time-stamp-inactive)
#'org-timestamp-inactive)
(apply #'completing-read args)))
(defun org--mks-read-key (allowed-keys prompt navigation-keys)

View File

@ -271,7 +271,7 @@ after the current heading."
For the acceptable UNITS, see `org-timestamp-change'."
(interactive)
(org-time-stamp nil)
(org-timestamp nil)
(when shift (org-timestamp-change shift units)))
(defun org-mouse-keyword-menu (keywords function &optional selected itemformat)
@ -713,7 +713,7 @@ This means, between the beginning of line and the point."
(popup-menu
'(nil
["Show Day" org-open-at-point t]
["Change Timestamp" org-time-stamp t]
["Change Timestamp" org-timestamp t]
["Delete Timestamp" (org-mouse-delete-timestamp) t]
["Compute Time Range" org-evaluate-time-range (org-at-date-range-p)]
"--"
@ -817,14 +817,14 @@ This means, between the beginning of line and the point."
["Set Deadline"
(progn (org-mouse-end-headline) (insert " ") (org-deadline))
:active (not (save-excursion
(org-mouse-re-search-line org-deadline-regexp)))]
(org-mouse-re-search-line org-deadline-regexp)))]
["Schedule Task"
(progn (org-mouse-end-headline) (insert " ") (org-schedule))
:active (not (save-excursion
(org-mouse-re-search-line org-scheduled-regexp)))]
(org-mouse-re-search-line org-scheduled-regexp)))]
["Insert Timestamp"
(progn (org-mouse-end-headline) (insert " ") (org-time-stamp nil)) t]
; ["Timestamp (inactive)" org-time-stamp-inactive t]
(progn (org-mouse-end-headline) (insert " ") (org-timestamp nil)) t]
; ["Timestamp (inactive)" org-timestamp-inactive t]
"--"
["Archive Subtree" org-archive-subtree]
["Cut Subtree" org-cut-special]

View File

@ -2627,10 +2627,10 @@ location of point."
duration-output-format)
ev))
;; Use <...> time-stamps so that Calc can handle them.
;; Use <...> timestamps so that Calc can handle them.
(setq form
(replace-regexp-in-string org-ts-regexp-inactive "<\\1>" form))
;; Internationalize local time-stamps by setting locale to
;; Internationalize local timestamps by setting locale to
;; "C".
(setq form
(replace-regexp-in-string

View File

@ -471,7 +471,8 @@ The time stamps may be either active or inactive.")
"Regular expression for specifying repeated events.
After a match, group 1 contains the repeat expression.")
(defconst org-time-stamp-formats '("%Y-%m-%d %a" . "%Y-%m-%d %a %H:%M")
(defvaralias 'org-time-stamp-formats 'org-timestamp-formats)
(defconst org-timestamp-formats '("%Y-%m-%d %a" . "%Y-%m-%d %a %H:%M")
"Formats for `format-time-string' which are used for time stamps.
The value is a cons cell containing two strings. The `car' and `cdr'
@ -1208,7 +1209,7 @@ are matched against file names, and values."
:group 'org)
(defcustom org-closed-keep-when-no-todo nil
"Remove CLOSED: time-stamp when switching back to a non-todo state?"
"Remove CLOSED: timestamp when switching back to a non-todo state?"
:group 'org-todo
:group 'org-keywords
:version "24.4"
@ -2397,7 +2398,8 @@ string as an argument and return the numeric priority."
:tag "Org Time"
:group 'org)
(defcustom org-time-stamp-rounding-minutes '(0 5)
(defvaralias 'org-time-stamp-rounding-minutes 'org-timestamp-rounding-minutes)
(defcustom org-timestamp-rounding-minutes '(0 5)
"Number of minutes to round time stamps to.
\\<org-mode-map>\
These are two values, the first applies when first creating a time stamp.
@ -2410,7 +2412,7 @@ numbers should be factors of 60, so for example 5, 10, 15.
When this is larger than 1, you can still force an exact time stamp by using
a double prefix argument to a time stamp command like \
`\\[org-time-stamp]' or `\\[org-time-stamp-inactive],
`\\[org-timestamp]' or `\\[org-timestamp-inactive],
and by using a prefix arg to `S-up/down' to specify the exact number
of minutes to shift."
:group 'org-time
@ -2423,21 +2425,22 @@ of minutes to shift."
(integer :tag "when modifying times")))
;; Normalize old customizations of this variable.
(when (integerp org-time-stamp-rounding-minutes)
(setq org-time-stamp-rounding-minutes
(list org-time-stamp-rounding-minutes
org-time-stamp-rounding-minutes)))
(when (integerp org-timestamp-rounding-minutes)
(setq org-timestamp-rounding-minutes
(list org-timestamp-rounding-minutes
org-timestamp-rounding-minutes)))
(defcustom org-display-custom-times nil
"Non-nil means overlay custom formats over all time stamps.
The formats are defined through the variable `org-time-stamp-custom-formats'.
The formats are defined through the variable `org-timestamp-custom-formats'.
To turn this on on a per-file basis, insert anywhere in the file:
#+STARTUP: customtime"
:group 'org-time
:type 'sexp)
(make-variable-buffer-local 'org-display-custom-times)
(defcustom org-time-stamp-custom-formats
(defvaralias 'org-time-stamp-custom-formats 'org-timestamp-custom-formats)
(defcustom org-timestamp-custom-formats
'("%m/%d/%y %a" . "%m/%d/%y %a %H:%M") ; american
"Custom formats for time stamps.
@ -2459,8 +2462,8 @@ strings."
(defun org-time-stamp-format (&optional with-time inactive custom)
"Get timestamp format for a time string.
The format is based on `org-time-stamp-formats' (if CUSTOM is nil) or or
`org-time-stamp-custom-formats' (if CUSTOM if non-nil).
The format is based on `org-timestamp-formats' (if CUSTOM is nil) or or
`org-timestamp-custom-formats' (if CUSTOM if non-nil).
When optional argument WITH-TIME is non-nil, the timestamp will contain
time.
@ -2471,8 +2474,8 @@ Otherwise, format inactive timestamp."
(let ((format (funcall
(if with-time #'cdr #'car)
(if custom
org-time-stamp-custom-formats
org-time-stamp-formats))))
org-timestamp-custom-formats
org-timestamp-formats))))
;; Strip brackets, if any.
(when (or (and (string-prefix-p "<" format)
(string-suffix-p ">" format))
@ -5001,10 +5004,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-time-stamp-rounding-minutes'. When PAST is non-nil, ensure
`org-timestamp-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-time-stamp-rounding-minutes)))
(car org-timestamp-rounding-minutes)))
(now (current-time)))
(if (< r 1)
now
@ -8349,10 +8352,10 @@ If the file does not exist, throw an error."
;;;###autoload
(defun org-open-at-point-global ()
"Follow a link or a time-stamp like Org mode does.
"Follow a link or a timestamp like Org mode does.
Also follow links and emails as seen by `thing-at-point'.
This command can be called in any mode to follow an external
link or a time-stamp that has Org mode syntax. Its behavior
link or a timestamp that has Org mode syntax. Its behavior
is undefined when called on internal links like fuzzy links.
Raise a user error when there is nothing to follow."
(interactive)
@ -8402,7 +8405,7 @@ entry, so it is possible to pick one, or all, of them. If point
is on a tag, call `org-tags-view' instead.
On top of syntactically correct links, this function also tries
to open links and time-stamps in comments, node properties, and
to open links and timestamps in comments, node properties, and
keywords if point is on something looking like a timestamp or
a link."
(interactive "P")
@ -8635,7 +8638,7 @@ or to another Org file, automatically push the old position onto the ring."
(defvar org-agenda-start-on-weekday)
(defvar org-agenda-buffer-name)
(defun org-follow-timestamp-link ()
"Open an agenda view for the time-stamp date/range at point."
"Open an agenda view for the timestamp date/range at point."
(require 'org-agenda)
;; Avoid changing the global value.
(let ((org-agenda-buffer-name org-agenda-buffer-name))
@ -9901,7 +9904,7 @@ on INACTIVE-OK."
nil)))
(defun org-get-repeat (&optional timestamp)
"Check if there is a time-stamp with repeater in this entry.
"Check if there is a timestamp with repeater in this entry.
Return the repeater, as a string, or nil. Also return nil when
this function is called before first heading.
@ -9931,7 +9934,7 @@ repeater from there instead."
(defvar org-log-note-extra)
(defvar org-log-setup nil)
(defun org-auto-repeat-maybe (done-word)
"Check if the current headline contains a repeated time-stamp.
"Check if the current headline contains a repeated timestamp.
If yes, set TODO state back to what it was and change the base date
of repeating deadline/scheduled time stamps to new date.
@ -9981,14 +9984,14 @@ This function is run automatically after each state change to a DONE state."
(or done-word (car org-done-keywords))
org-last-state
org-log-repeat)))
;; Time-stamps without a repeater are usually skipped. However,
;; a SCHEDULED time-stamp without one is removed, as they are no
;; Timestamps without a repeater are usually skipped. However,
;; a SCHEDULED timestamp without one is removed, as they are no
;; longer relevant.
(save-excursion
(let ((scheduled (org-entry-get (point) "SCHEDULED")))
(when (and scheduled (not (string-match-p org-repeat-re scheduled)))
(org-remove-timestamp-with-keyword org-scheduled-string))))
;; Update every time-stamp with a repeater in the entry.
;; Update every timestamp with a repeater in the entry.
(let ((planning-re (regexp-opt
(list org-scheduled-string org-deadline-string))))
(while (re-search-forward org-repeat-re end t)
@ -10020,7 +10023,7 @@ This function is run automatically after each state change to a DONE state."
;; repeater is by hours.
(if (equal what "h")
(org-timestamp-change
(floor (- (org-time-stamp-to-now ts t)) 60) 'minute)
(floor (- (org-timestamp-to-now ts t)) 60) 'minute)
(org-timestamp-change
(- (org-today) (time-to-days time)) 'day)))
((equal "+" repeater-type)
@ -10356,7 +10359,7 @@ WHAT entry will also be removed."
(otherwise (error "Invalid planning type: %s" what)))
" ")
;; Insert associated timestamp.
(let ((ts (org-insert-time-stamp
(let ((ts (org-insert-timestamp
time
(or org-time-was-given
(and (eq what 'closed) org-log-done-with-time))
@ -10656,7 +10659,7 @@ D Show deadlines and scheduled items between a date range."
(deadline "only deadline")
(active "only active timestamps")
(inactive "only inactive timestamps")
(closed "with a closed time-stamp")
(closed "with a closed timestamp")
(otherwise "scheduled/deadline")))
(let ((answer (read-char-exclusive)))
(cl-case answer
@ -12587,8 +12590,8 @@ strings."
(member specific '("TIMESTAMP" "TIMESTAMP_IA")))
(let ((find-ts
(lambda (end ts)
;; Fix next time-stamp before END. TS is the
;; list of time-stamps found so far.
;; Fix next timestamp before END. TS is the
;; list of timestamps found so far.
(let ((ts ts)
(regexp (cond
((string= specific "TIMESTAMP")
@ -13524,9 +13527,10 @@ Return the position where this entry starts, or nil if there is no such entry."
(defvar org-last-changed-timestamp nil)
(defvar org-last-inserted-timestamp nil
"The last time stamp inserted with `org-insert-time-stamp'.")
"The last time stamp inserted with `org-insert-timestamp'.")
(defun org-time-stamp (arg &optional inactive)
(defalias 'org-time-stamp #'org-timestamp)
(defun org-timestamp (arg &optional inactive)
"Prompt for a date/time and insert a time stamp.
If the user specifies a time like HH:MM or if this command is
@ -13568,10 +13572,12 @@ non-nil."
inactive)))))
(cond
((and ts
(memq last-command '(org-time-stamp org-time-stamp-inactive))
(memq this-command '(org-time-stamp org-time-stamp-inactive)))
(memq last-command '( org-time-stamp org-time-stamp-inactive
org-timestamp org-timestamp-inactive))
(memq this-command '( org-time-stamp org-time-stamp-inactive
org-timestamp org-timestamp-inactive)))
(insert "--")
(org-insert-time-stamp time (or org-time-was-given arg) inactive))
(org-insert-timestamp time (or org-time-was-given arg) inactive))
(ts
;; Make sure we're on a timestamp. When in the middle of a date
;; range, move arbitrarily to range end.
@ -13580,7 +13586,7 @@ non-nil."
(org-at-timestamp-p 'lax))
(replace-match "")
(setq org-last-changed-timestamp
(org-insert-time-stamp
(org-insert-timestamp
time (or org-time-was-given arg)
inactive nil nil (list org-end-time-was-given)))
(when repeater
@ -13590,8 +13596,8 @@ non-nil."
(concat (substring org-last-inserted-timestamp 0 -1)
" " repeater ">")))
(message "Timestamp updated"))
((equal arg '(16)) (org-insert-time-stamp time t inactive))
(t (org-insert-time-stamp
((equal arg '(16)) (org-insert-timestamp time t inactive))
(t (org-insert-timestamp
time (or org-time-was-given arg) inactive nil nil
(list org-end-time-was-given))))))
@ -13612,7 +13618,8 @@ non-nil."
(concat t1 "+" (number-to-string dh)
(and (/= 0 dm) (format ":%02d" dm)))))))
(defun org-time-stamp-inactive (&optional arg)
(defalias 'org-time-stamp-inactive #'org-timestamp-inactive)
(defun org-timestamp-inactive (&optional arg)
"Insert an inactive time stamp.
An inactive time stamp is enclosed in square brackets instead of
@ -13627,7 +13634,7 @@ Otherwise, only the date is included.
When called with two universal prefix arguments, insert an inactive time stamp
with the current time without prompting the user."
(interactive "P")
(org-time-stamp arg 'inactive))
(org-timestamp arg 'inactive))
(defvar org-date-ovl (make-overlay 1 1))
(overlay-put org-date-ovl 'face 'org-date-selected)
@ -13708,10 +13715,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-time-stamp-rounding-minutes
(org-timestamp-rounding-minutes
(if (equal org-with-time '(16))
'(0 0)
org-time-stamp-rounding-minutes))
org-timestamp-rounding-minutes))
(ct (org-current-time))
(org-def (or org-overriding-default-time default-time ct))
(org-defdecode (decode-time org-def))
@ -14159,7 +14166,8 @@ This is used by `org-read-date' in a temporary keymap for the calendar buffer."
(setq org-ans1 (format-time-string "%Y-%m-%d" time)))
(when (active-minibuffer-window) (exit-minibuffer))))
(defun org-insert-time-stamp (time &optional with-hm inactive pre post extra)
(defalias 'org-insert-time-stamp #'org-insert-timestamp)
(defun org-insert-timestamp (time &optional with-hm inactive pre post extra)
"Insert a date stamp for the date given by the internal TIME.
See `format-time-string' for the format of TIME.
WITH-HM means use the stamp format that includes the time of the day.
@ -14186,7 +14194,8 @@ The command returns the inserted time stamp."
(insert-before-markers-and-inherit (or post ""))
(setq org-last-inserted-timestamp stamp))))
(defun org-toggle-time-stamp-overlays ()
(defalias 'org-toggle-time-stamp-overlays #'org-toggle-timestamp-overlays)
(defun org-toggle-timestamp-overlays ()
"Toggle the use of custom time stamp formats."
(interactive)
(setq org-display-custom-times (not org-display-custom-times))
@ -14228,7 +14237,8 @@ Don't touch the rest."
(let ((n 0))
(mapcar (lambda (x) (if (< (setq n (1+ n)) 7) (or x 0) x)) time)))
(defun org-time-stamp-to-now (timestamp-string &optional seconds)
(defalias 'org-time-stamp-to-now #'org-timestamp-to-now)
(defun org-timestamp-to-now (timestamp-string &optional seconds)
"Difference between TIMESTAMP-STRING and now in days.
If SECONDS is non-nil, return the difference in seconds."
(let ((fdiff (if seconds #'float-time #'time-to-days)))
@ -14238,7 +14248,7 @@ If SECONDS is non-nil, return the difference in seconds."
(defun org-deadline-close-p (timestamp-string &optional ndays)
"Is the time in TIMESTAMP-STRING close to the current date?"
(setq ndays (or ndays (org-get-wdays timestamp-string)))
(and (<= (org-time-stamp-to-now timestamp-string) ndays)
(and (<= (org-timestamp-to-now timestamp-string) ndays)
(not (org-entry-is-done-p))))
(defun org-get-wdays (ts &optional delay zero-delay)
@ -14306,7 +14316,7 @@ Allowed values for TYPE are:
inactive: only inactive timestamps ([...])
scheduled: only scheduled timestamps
deadline: only deadline timestamps
closed: only closed time-stamps
closed: only closed timestamps
When TYPE is nil, fall back on returning a regexp that matches
both scheduled and deadline timestamps."
@ -14408,7 +14418,7 @@ days in order to avoid rounding problems."
(goto-char (line-beginning-position))
(re-search-forward org-tr-regexp-both (line-end-position) t))
(unless (org-at-date-range-p t)
(user-error "Not at a time-stamp range, and none found in current line")))
(user-error "Not at a timestamp range, and none found in current line")))
(let* ((ts1 (match-string 1))
(ts2 (match-string 2))
(havetime (or (> (length ts1) 15) (> (length ts2) 15)))
@ -14854,7 +14864,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-time-stamp-rounding-minutes'.
according to `org-timestamp-rounding-minutes'.
When SUPPRESS-TMP-DELAY is non-nil, suppress delays like
\"--2d\"."
@ -14862,14 +14872,14 @@ 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-time-stamp-rounding-minutes) 1))
(dm (max (nth 1 org-timestamp-rounding-minutes) 1))
extra rem
ts time time0 fixnext clrgx)
(unless timestamp? (user-error "Not at a timestamp"))
(if (and (not what) (eq timestamp? 'bracket))
(org-toggle-timestamp-type)
;; Point isn't on brackets. Remember the part of the time-stamp
;; the point was in. Indeed, size of time-stamps may change,
;; Point isn't on brackets. Remember the part of the timestamp
;; the point was in. Indeed, size of timestamps may change,
;; but point must be kept in the same category nonetheless.
(setq origin-cat timestamp?)
(when (and (not what) (not (eq timestamp? 'day))
@ -14932,13 +14942,13 @@ When SUPPRESS-TMP-DELAY is non-nil, suppress delays like
(setcar (nthcdr 1 time0) (or (nth 1 time0) 0))
(setcar (nthcdr 2 time0) (or (nth 2 time0) 0))
(setq time (org-encode-time time0))))
;; Insert the new time-stamp, and ensure point stays in the same
;; Insert the new timestamp, and ensure point stays in the same
;; category as before (i.e. not after the last position in that
;; category).
(let ((pos (point)))
;; Stay before inserted string. `save-excursion' is of no use.
(setq org-last-changed-timestamp
(org-insert-time-stamp time with-hm inactive nil nil extra))
(org-insert-timestamp time with-hm inactive nil nil extra))
(goto-char pos))
(save-match-data
(looking-at org-ts-regexp3)
@ -14950,8 +14960,8 @@ When SUPPRESS-TMP-DELAY is non-nil, suppress delays like
(`hour (min (match-end 7) origin))
(`minute (min (1- (match-end 8)) origin))
((pred integerp) (min (1- (match-end 0)) origin))
;; Point was right after the time-stamp. However, the
;; time-stamp length might have changed, so refer to
;; Point was right after the timestamp. However, the
;; timestamp length might have changed, so refer to
;; (match-end 0) instead.
(`after (match-end 0))
;; `year' and `month' have both fixed size: point couldn't
@ -15076,7 +15086,7 @@ If there is already a time stamp at the cursor position, update it."
(if (org-at-timestamp-p 'lax)
(org-timestamp-change 0 'calendar)
(let ((cal-date (org-get-date-from-calendar)))
(org-insert-time-stamp
(org-insert-timestamp
(org-encode-time 0 0 0 (nth 1 cal-date) (car cal-date) (nth 2 cal-date))))))
(defcustom org-image-actual-width t
@ -17334,8 +17344,8 @@ When in a LaTeX environment, call `org-edit-latex-environment'.
When at an INCLUDE, SETUPFILE or BIBLIOGRAPHY keyword, visit the included file.
When at a footnote reference, call `org-edit-footnote-reference'.
When at a planning line call, `org-deadline' and/or `org-schedule'.
When at an active timestamp, call `org-time-stamp'.
When at an inactive timestamp, call `org-time-stamp-inactive'.
When at an active timestamp, call `org-timestamp'.
When at an inactive timestamp, call `org-timestamp-inactive'.
On a link, call `ffap' to visit the link at point.
Otherwise, return a user error."
(interactive "P")
@ -17395,8 +17405,8 @@ Otherwise, return a user error."
(`inline-src-block (org-edit-inline-src-code))
(`latex-fragment (org-edit-latex-fragment))
(`timestamp (if (eq 'inactive (org-element-property :type context))
(call-interactively #'org-time-stamp-inactive)
(call-interactively #'org-time-stamp)))
(call-interactively #'org-timestamp-inactive)
(call-interactively #'org-timestamp)))
(`link (call-interactively #'ffap))
(_ (user-error "No special environment to edit here"))))))))
@ -18115,8 +18125,8 @@ an argument, unconditionally call `org-insert-heading'."
["Column view of properties" org-columns t]
["Insert Column View DBlock" org-columns-insert-dblock t])
("Dates and Scheduling"
["Timestamp" org-time-stamp (not (org-before-first-heading-p))]
["Timestamp (inactive)" org-time-stamp-inactive (not (org-before-first-heading-p))]
["Timestamp" org-timestamp (not (org-before-first-heading-p))]
["Timestamp (inactive)" org-timestamp-inactive (not (org-before-first-heading-p))]
("Change Date"
["1 Day Later" org-shiftright (org-at-timestamp-p 'lax)]
["1 Day Earlier" org-shiftleft (org-at-timestamp-p 'lax)]
@ -18126,7 +18136,7 @@ an argument, unconditionally call `org-insert-heading'."
["Schedule Item" org-schedule (not (org-before-first-heading-p))]
["Deadline" org-deadline (not (org-before-first-heading-p))]
"--"
["Custom time format" org-toggle-time-stamp-overlays
["Custom time format" org-toggle-timestamp-overlays
:style radio :selected org-display-custom-times]
"--"
["Goto Calendar" org-goto-calendar t]
@ -19964,7 +19974,7 @@ Return a new timestamp object."
(defun org-timestamp-translate (timestamp &optional boundary)
"Translate TIMESTAMP object to custom format.
Format string is defined in `org-time-stamp-custom-formats',
Format string is defined in `org-timestamp-custom-formats',
which see.
When optional argument BOUNDARY is non-nil, it is either the

View File

@ -818,7 +818,7 @@ holding export options."
(let ((title (org-export-data (plist-get info :title) info))
(subtitle (org-export-data (plist-get info :subtitle) info)))
(concat
;; Time-stamp.
;; Timestamp.
(and (plist-get info :time-stamp-file)
(format-time-string "%% Created %Y-%m-%d %a %H:%M\n"))
;; LaTeX compiler

View File

@ -682,7 +682,7 @@ PLIST-KEY."
CONTENTS is the transcoded contents string. INFO is a plist
holding export options."
(concat
;; Time-stamp.
;; Timestamp.
(and (plist-get info :time-stamp-file)
(format-time-string "%% Created %Y-%m-%d %a %H:%M\n"))
;; LaTeX compiler

View File

@ -1988,7 +1988,7 @@ holding export options."
(let ((title (org-export-data (plist-get info :title) info))
(spec (org-latex--format-spec info)))
(concat
;; Time-stamp.
;; Timestamp.
(and (plist-get info :time-stamp-file)
(format-time-string "%% Created %Y-%m-%d %a %H:%M\n"))
;; LaTeX compiler.

View File

@ -889,7 +889,7 @@ style from the list."
When nil, export timestamps as plain text.
When non-nil, map `org-time-stamp-custom-formats' to a pair of
When non-nil, map `org-timestamp-custom-formats' to a pair of
OpenDocument date-styles with names \"OrgDate1\" and \"OrgDate2\"
respectively. A timestamp with no time component is formatted
with style \"OrgDate1\" while one with explicit hour and minutes

View File

@ -174,7 +174,7 @@ included. See the backend documentation for more information.
:preserve-breaks `org-export-preserve-breaks'
:section-numbers `org-export-with-section-numbers'
:select-tags `org-export-select-tags'
:time-stamp-file `org-export-time-stamp-file'
:time-stamp-file `org-export-timestamp-file'
:with-archived-trees `org-export-with-archived-trees'
:with-author `org-export-with-author'
:with-creator `org-export-with-creator'
@ -891,7 +891,7 @@ time in `current-time' format."
(file-attribute-modification-time (file-attributes file))
(let ((date (org-publish-find-property file :date project)))
;; DATE is a secondary string. If it contains
;; a time-stamp, convert it to internal format.
;; a timestamp, convert it to internal format.
;; Otherwise, use FILE modification time.
(cond ((let ((ts (and (consp date) (assq 'timestamp date))))
(and ts

View File

@ -119,7 +119,7 @@
(:headline-levels nil "H" org-export-headline-levels)
(:preserve-breaks nil "\\n" org-export-preserve-breaks)
(:section-numbers nil "num" org-export-with-section-numbers)
(:time-stamp-file nil "timestamp" org-export-time-stamp-file)
(:time-stamp-file nil "timestamp" org-export-timestamp-file)
(:with-archived-trees nil "arch" org-export-with-archived-trees)
(:with-author nil "author" org-export-with-author)
(:with-broken-links nil "broken-links" org-export-with-broken-links)
@ -398,16 +398,16 @@ e.g. \"date:nil\"."
:safe #'booleanp)
(defcustom org-export-date-timestamp-format nil
"Time-stamp format string to use for DATE keyword.
"Timestamp format string to use for DATE keyword.
The format string, when specified, only applies if date consists
in a single time-stamp. Otherwise its value will be ignored.
in a single timestamp. Otherwise its value will be ignored.
See `format-time-string' for details on how to build this
string."
:group 'org-export-general
:type '(choice
(string :tag "Time-stamp format string")
(string :tag "Timestamp format string")
(const :tag "No format string" nil))
:safe (lambda (x) (or (null x) (stringp x))))
@ -576,7 +576,7 @@ e.g. \"inline:nil\"."
"Non-nil means include planning info in export.
Planning info is the line containing either SCHEDULED:,
DEADLINE:, CLOSED: time-stamps, or a combination of them.
DEADLINE:, CLOSED: timestamps, or a combination of them.
This option can also be set with the OPTIONS keyword,
e.g. \"p:t\"."
@ -804,7 +804,8 @@ e.g. \"title:nil\"."
:type 'boolean
:safe #'booleanp)
(defcustom org-export-time-stamp-file t
(defvaralias 'org-export-time-stamp-file 'org-export-timestamp-file)
(defcustom org-export-timestamp-file t
"Non-nil means insert a time stamp into the exported file.
The time stamp shows when the file was created. This option can
also be set with the OPTIONS keyword, e.g. \"timestamp:nil\"."
@ -3309,7 +3310,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 nil))))
(org-insert-timestamp nil))))
((equal (car key) "TITLE")
(or (let ((visited-file
(buffer-file-name (buffer-base-buffer))))

View File

@ -2233,8 +2233,8 @@ See also `test-org-table/copy-field'."
(org-table-calc-current-TBLFM)
(buffer-string)))))
(ert-deftest test-org-table/time-stamps ()
"Test time-stamps handling."
(ert-deftest test-org-table/timestamps ()
"Test timestamps handling."
;; Standard test.
(should
(string-match-p
@ -2243,7 +2243,7 @@ See also `test-org-table/copy-field'."
"| <2016-07-07 Sun> | <2016-07-08 Fri> | |\n<point>#+TBLFM: $3=$2-$1"
(org-table-calc-current-TBLFM)
(buffer-string))))
;; Handle locale specific time-stamps.
;; Handle locale specific timestamps.
(should
(string-match-p
"| 1 |"

View File

@ -7943,7 +7943,7 @@ Paragraph<point>"
(org-todo "DONE")
(buffer-string)))))
;; Throw an error if repeater unit is the hour and no time is
;; provided in the time-stamp.
;; provided in the timestamp.
(should-error
(let ((org-todo-keywords '((sequence "TODO" "DONE"))))
(org-test-with-temp-text "* TODO H\n<2012-03-29 Thu +2h>"
@ -8098,7 +8098,7 @@ SCHEDULED: <2021-06-15 Tue +1d>"
"* DONE task
CLOSED: %s"
(org-test-with-temp-text ""
(org-insert-time-stamp (current-time) t t)
(org-insert-timestamp (current-time) t t)
(buffer-string)))
(let ((org-log-done 'time)
(org-log-done-with-time t)
@ -8115,7 +8115,7 @@ CLOSED: %s"
"* DONE task
CLOSED: %s"
(org-test-with-temp-text ""
(org-insert-time-stamp (current-time) nil t)
(org-insert-timestamp (current-time) nil t)
(buffer-string)))
(let ((org-log-done 'time)
(org-log-done-with-time nil)
@ -8149,7 +8149,7 @@ CLOSED: %s"
* DONE task
CLOSED: %s"
(org-test-with-temp-text ""
(org-insert-time-stamp (current-time) t t)
(org-insert-timestamp (current-time) t t)
(buffer-string)))
(let ((org-log-done nil)
(org-log-done-with-time t)
@ -8189,7 +8189,7 @@ CLOSED: %s
:LOGGING: logdone
:END:"
(org-test-with-temp-text ""
(org-insert-time-stamp (current-time) t t)
(org-insert-timestamp (current-time) t t)
(buffer-string)))
(let ((org-log-done nil)
(org-log-done-with-time t)
@ -8275,7 +8275,7 @@ CLOSED: %s
(should-not
(org-test-with-temp-text "[2012-03-29 Thu]"
(org-at-timestamp-p)))
;; When optional argument is `agenda', recognize time-stamps in
;; When optional argument is `agenda', recognize timestamps in
;; planning info line, property drawers and clocks.
(should
(org-test-with-temp-text "* H\nSCHEDULED: <point><2012-03-29 Thu>"
@ -8330,8 +8330,8 @@ CLOSED: %s
(org-test-with-temp-text "# [2012-03-29 Thu]<point>"
(org-at-timestamp-p 'lax))))
(ert-deftest test-org/time-stamp ()
"Test `org-time-stamp' specifications."
(ert-deftest test-org/timestamp ()
"Test `org-timestamp' specifications."
;; Insert chosen time stamp at point.
(should
(string-match
@ -8340,7 +8340,7 @@ CLOSED: %s
(cl-letf (((symbol-function 'org-read-date)
(lambda (&rest _args)
(org-time-string-to-time "2014-03-04"))))
(org-time-stamp nil)
(org-timestamp nil)
(buffer-string)))))
;; With a prefix argument, also insert time.
(should
@ -8350,7 +8350,7 @@ CLOSED: %s
(cl-letf (((symbol-function 'org-read-date)
(lambda (&rest _args)
(org-time-string-to-time "2014-03-04 00:41"))))
(org-time-stamp '(4))
(org-timestamp '(4))
(buffer-string)))))
;; With two universal prefix arguments, insert an active timestamp
;; with the current time without prompting the user.
@ -8359,7 +8359,7 @@ CLOSED: %s
"Te<2014-03-04 .*? 00:41>xt"
(org-test-with-temp-text "Te<point>xt"
(org-test-at-time "2014-03-04 00:41"
(org-time-stamp '(16))
(org-timestamp '(16))
(buffer-string)))))
;; When optional argument is non-nil, insert an inactive timestamp.
(should
@ -8369,7 +8369,7 @@ CLOSED: %s
(cl-letf (((symbol-function 'org-read-date)
(lambda (&rest _args)
(org-time-string-to-time "2014-03-04"))))
(org-time-stamp nil t)
(org-timestamp nil t)
(buffer-string)))))
;; When called from a timestamp, replace existing one.
(should
@ -8379,7 +8379,7 @@ CLOSED: %s
(cl-letf (((symbol-function 'org-read-date)
(lambda (&rest _args)
(org-time-string-to-time "2014-03-04"))))
(org-time-stamp nil)
(org-timestamp nil)
(buffer-string)))))
(should
(string-match
@ -8388,7 +8388,7 @@ CLOSED: %s
(cl-letf (((symbol-function 'org-read-date)
(lambda (&rest _args)
(org-time-string-to-time "2014-03-04"))))
(org-time-stamp nil)
(org-timestamp nil)
(buffer-string)))))
;; When replacing a timestamp, preserve repeater, if any.
(should
@ -8398,7 +8398,7 @@ CLOSED: %s
(cl-letf (((symbol-function 'org-read-date)
(lambda (&rest _args)
(org-time-string-to-time "2014-03-04"))))
(org-time-stamp nil)
(org-timestamp nil)
(buffer-string)))))
;; When called twice in a raw, build a date range.
(should
@ -8408,9 +8408,9 @@ CLOSED: %s
(cl-letf (((symbol-function 'org-read-date)
(lambda (&rest _args)
(org-time-string-to-time "2014-03-04"))))
(let ((last-command 'org-time-stamp)
(this-command 'org-time-stamp))
(org-time-stamp nil))
(let ((last-command 'org-timestamp)
(this-command 'org-timestamp))
(org-timestamp nil))
(buffer-string))))))
(ert-deftest test-org/timestamp-has-time-p ()
@ -8520,42 +8520,42 @@ CLOSED: %s
(equal "<29>--<30>"
(org-test-with-temp-text "<2012-03-29 Thu>--<2012-03-30 Fri>"
(let ((org-display-custom-times t)
(org-time-stamp-custom-formats '("<%d>" . "<%d>")))
(org-timestamp-custom-formats '("<%d>" . "<%d>")))
(org-timestamp-translate (org-element-context))))))
;; Translate date range start.
(should
(equal "<29>"
(org-test-with-temp-text "<2012-03-29 Thu>--<2012-03-30 Fri>"
(let ((org-display-custom-times t)
(org-time-stamp-custom-formats '("<%d>" . "<%d>")))
(org-timestamp-custom-formats '("<%d>" . "<%d>")))
(org-timestamp-translate (org-element-context) 'start)))))
;; Translate date range end.
(should
(equal "<30>"
(org-test-with-temp-text "<2012-03-29 Thu>--<2012-03-30 Fri>"
(let ((org-display-custom-times t)
(org-time-stamp-custom-formats '("<%d>" . "<%d>")))
(org-timestamp-custom-formats '("<%d>" . "<%d>")))
(org-timestamp-translate (org-element-context) 'end)))))
;; Translate time range.
(should
(equal "<08>--<16>"
(org-test-with-temp-text "<2012-03-29 Thu 8:30-16:40>"
(let ((org-display-custom-times t)
(org-time-stamp-custom-formats '("<%d>" . "<%H>")))
(org-timestamp-custom-formats '("<%d>" . "<%H>")))
(org-timestamp-translate (org-element-context))))))
;; Translate non-range timestamp.
(should
(equal "<29>"
(org-test-with-temp-text "<2012-03-29 Thu>"
(let ((org-display-custom-times t)
(org-time-stamp-custom-formats '("<%d>" . "<%d>")))
(org-timestamp-custom-formats '("<%d>" . "<%d>")))
(org-timestamp-translate (org-element-context))))))
;; Do not change `diary' timestamps.
(should
(equal "<%%(org-float t 4 2)>"
(org-test-with-temp-text "<%%(org-float t 4 2)>"
(let ((org-display-custom-times t)
(org-time-stamp-custom-formats '("<%d>" . "<%d>")))
(org-timestamp-custom-formats '("<%d>" . "<%d>")))
(org-timestamp-translate (org-element-context)))))))
(ert-deftest test-org/timestamp-from-string ()