From 5d14e88c5146806de01b1f6b0922962d0e6dbcbe Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Wed, 7 Dec 2022 14:23:29 +0300 Subject: [PATCH] org-make-tags-matcher: Fix regexp * lisp/org.el (org-make-tags-matcher): Match ///<+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 Link: https://orgmode.org/list/87bkokgtd7.fsf@kyleam.com --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index ab6212dac..816c165e1 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -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))