summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2020-12-18 14:35:09 +0100
committerKyle Meyer <kyle@kyleam.com>2021-02-14 17:38:04 -0500
commit4c934424d6e45daa30d2e5a2b3217181216d4e37 (patch)
tree8f1fc180cdc33afd21d5371096fb9c09f36310ae
parent61336f80dc94a442842289d2f33f91190383e9b2 (diff)
downloadorg-mode-4c934424d6e45daa30d2e5a2b3217181216d4e37.tar.gz
Backport commit 46394dff7 from Emacs
* lisp/ob-core.el (org-babel--string-to-number): Put hyphen last in alternative. * lisp/org-agenda.el (org-agenda-filter): Escape '+' correctly. Follow good regexp practice 46394dff7f01e7fe4af06a6c344e151af5c3eef4 Mattias EngdegÄrd Fri Dec 18 14:35:09 2020 +0100
-rw-r--r--lisp/ob-core.el2
-rw-r--r--lisp/org-agenda.el6
2 files changed, 4 insertions, 4 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index b1aee1b..1343410 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2995,7 +2995,7 @@ situations in which is it not appropriate."
"If STRING represents a number return its value.
Otherwise return nil."
(unless (or (string-match-p "\\s-" (org-trim string))
- (not (string-match-p "^[0-9-e.+ ]+$" string)))
+ (not (string-match-p "^[0-9e.+ -]+$" string)))
(let ((interned-string (ignore-errors (read string))))
(when (numberp interned-string)
interned-string))))
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index dedf7e5..6fa6e0f 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7734,9 +7734,9 @@ the variable `org-agenda-auto-exclude-function'."
(negate (equal strip-or-accumulate '(4)))
(cf (mapconcat #'identity org-agenda-category-filter ""))
(tf (mapconcat #'identity org-agenda-tag-filter ""))
- (rpl-fn (lambda (c) (replace-regexp-in-string "^\+" "" (or (car c) ""))))
- (ef (replace-regexp-in-string "^\+" "" (or (car org-agenda-effort-filter) "")))
- (rf (replace-regexp-in-string "^\+" "" (or (car org-agenda-regexp-filter) "")))
+ (rpl-fn (lambda (c) (replace-regexp-in-string "^\\+" "" (or (car c) ""))))
+ (ef (replace-regexp-in-string "^\\+" "" (or (car org-agenda-effort-filter) "")))
+ (rf (replace-regexp-in-string "^\\+" "" (or (car org-agenda-regexp-filter) "")))
(ff (concat cf tf ef (when (not (equal rf "")) (concat "/" rf "/"))))
(f-string (completing-read
(concat