org-at-timestamp-p: Fix invalid regexp groups for 'agenda scope
* lisp/org.el (org-at-timestamp-p): Make sure that match groups follow the docstring in `agenda' scope. Update docstring explaining return values for sexp timestamps. Reported in https://orgmode.org/list/CAKJdtO8bqdbW5N6pRFNQRATjm2daEBDCpJj0njwcd4fmhSJSKQ@mail.gmail.com
This commit is contained in:
parent
682ccdfffe
commit
1f617727f1
24
lisp/org.el
24
lisp/org.el
|
@ -15012,20 +15012,24 @@ value is equivalent to `inactive'.
|
||||||
When at a timestamp, return the position of the point as a symbol
|
When at a timestamp, return the position of the point as a symbol
|
||||||
among `bracket', `after', `year', `month', `hour', `minute',
|
among `bracket', `after', `year', `month', `hour', `minute',
|
||||||
`day' or a number of character from the last know part of the
|
`day' or a number of character from the last know part of the
|
||||||
time stamp.
|
time stamp. If diary sexp timestamps, any point inside the timestamp
|
||||||
|
is considered `day' (i.e. only `bracket', `day', and `after' return
|
||||||
|
values are possible).
|
||||||
|
|
||||||
When matching, the match groups are the following:
|
When matching, the match groups are the following:
|
||||||
group 1: year
|
group 1: year, if any
|
||||||
group 2: month
|
group 2: month, if any
|
||||||
group 3: day number
|
group 3: day number, if any
|
||||||
group 4: day name
|
group 4: day name, if any
|
||||||
group 5: hours, if any
|
group 5: hours, if any
|
||||||
group 6: minutes, if any"
|
group 6: minutes, if any"
|
||||||
(let* ((regexp (if extended
|
(let* ((regexp
|
||||||
(if (eq extended 'agenda)
|
(if extended
|
||||||
org-element--timestamp-regexp
|
(if (eq extended 'agenda)
|
||||||
org-ts-regexp3)
|
(rx (or (regexp org-ts-regexp3)
|
||||||
org-ts-regexp2))
|
(regexp org-element--timestamp-regexp)))
|
||||||
|
org-ts-regexp3)
|
||||||
|
org-ts-regexp2))
|
||||||
(pos (point))
|
(pos (point))
|
||||||
(match?
|
(match?
|
||||||
(let ((boundaries (org-in-regexp regexp)))
|
(let ((boundaries (org-in-regexp regexp)))
|
||||||
|
|
Loading…
Reference in New Issue