Ver Fonte

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
Paul Eggert há 5 anos atrás
pai
commit
a3101370bd
2 ficheiros alterados com 2 adições e 2 exclusões
  1. 1 1
      lisp/org-agenda.el
  2. 1 1
      lisp/org.el

+ 1 - 1
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))

+ 1 - 1
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)