0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-25 22:32:51 +00:00

org-make-tags-matcher: Fix regexp

* lisp/org.el (org-make-tags-matcher): Match
<now>/<today>/<tomorrow>/<+3d>/etc time queries.  They are allowed by
"11.3.3 Matching tags and properties" section of the manual.

Fixes regression from e022a0cea.

Reported-by: Carlo Tambuatco <oraclmaster@gmail.com>
Link: https://orgmode.org/list/87bkokgtd7.fsf@kyleam.com
This commit is contained in:
Ihor Radchenko 2022-12-07 14:23:29 +03:00
parent cc5427b7ef
commit 5d14e88c51
No known key found for this signature in database
GPG key ID: 6470762A7DA11D8B

View file

@ -11380,7 +11380,7 @@ See also `org-scan-tags'."
(pv (match-string 7 term))
(regexp (eq (string-to-char pv) ?{))
(strp (eq (string-to-char pv) ?\"))
(timep (string-match-p "^\"[[<][0-9]+.*[]>]\"$" pv))
(timep (string-match-p "^\"[[<]\\(?:[0-9]+\\|now\\|today\\|tomorrow\\|[+-][0-9]+[dmwy]\\).*[]>]\"$" pv))
(po (org-op-to-function (match-string 6 term)
(if timep 'time strp))))
(setq pv (if (or regexp strp) (substring pv 1 -1) pv))