summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-12-05 19:31:00 -0800
committerKyle Meyer <kyle@kyleam.com>2019-12-05 22:59:06 -0500
commita3101370bdf27e4a56bcb1895847816d4902b20d (patch)
treead575961bab85b6d2d91903135bea5b3573693db
parent9c5174e2356d4a6dd9a0c1d17ca937a50a52d294 (diff)
downloadorg-mode-a3101370bdf27e4a56bcb1895847816d4902b20d.tar.gz
Backport commit 4c9330771 from Emacs
* lisp/org-agenda.el (org-agenda-filter): Fix unescaped literal ‘+’ in regexp. Reported by Mattias Engdegård in: https://lists.gnu.org/r/emacs-devel/2019-12/msg00215.html * lisp/org.el (org-clone-subtree-with-time-shift): Fix a regexp typo that mishandled strings like ‘\1d’, reported by the same email. 2019-12-05 regexp lint fixes 4c933077157ba409d645f4649c8a3a8e534d53d5 Paul Eggert Thu Dec 5 19:32:12 2019 -0800
-rw-r--r--lisp/org-agenda.el2
-rw-r--r--lisp/org.el2
2 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index a0736e3..e6c37fb 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7670,7 +7670,7 @@ the variable `org-agenda-auto-exclude-function'."
(if negate "Negative filter" "Filter")
" [+cat-tag<0:10-/regexp/]: ")
'org-agenda-filter-completion-function))
- (keep (or (if (string-match "^+[-+]" f-string)
+ (keep (or (if (string-match "^\\+[+-]" f-string)
(progn (setq f-string (substring f-string 1)) t))
(equal strip-or-accumulate '(16))))
(fc (if keep org-agenda-category-filter))
diff --git a/lisp/org.el b/lisp/org.el
index b4858a4..869e5be 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7825,7 +7825,7 @@ with the original repeater."
""))) ;No time shift
(doshift
(and (org-string-nw-p shift)
- (or (string-match "\\`[ \t]*\\([\\+\\-]?[0-9]+\\)\\([dwmy]\\)[ \t]*\\'"
+ (or (string-match "\\`[ \t]*\\([+-]?[0-9]+\\)\\([dwmy]\\)[ \t]*\\'"
shift)
(user-error "Invalid shift specification %s" shift)))))
(goto-char end-of-tree)