summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien <bzg@gnu.org>2015-08-17 20:42:50 +0200
committerBastien <bzg@gnu.org>2015-08-17 20:42:50 +0200
commita03cd64994b88913c56ae8534d4b5479ef852809 (patch)
tree2cd3b45d747c78ef2ff7dea853589106a2c956f2
parent17a225621c73b4990bd4458924a249aa0a11650e (diff)
downloadorg-mode-a03cd64994b88913c56ae8534d4b5479ef852809.tar.gz
Fix c6d9a4ec
* org.el (org-check-before-date, org-check-after-date): Save match data.
-rwxr-xr-xlisp/org.el26
1 files changed, 14 insertions, 12 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 367d7e1..e8b78a3 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17485,12 +17485,13 @@ both scheduled and deadline timestamps."
(regexp (org-re-timestamp org-ts-type))
(callback
`(lambda ()
- (and ,(if (memq org-ts-type '(active inactive all))
- '(eq (org-element-type (org-element-context)) 'timestamp)
- '(org-at-planning-p))
- (time-less-p
- (org-time-string-to-time (match-string 1))
- (org-time-string-to-time date))))))
+ (let ((match (match-string 1)))
+ (and ,(if (memq org-ts-type '(active inactive all))
+ '(eq (org-element-type (org-element-context)) 'timestamp)
+ '(org-at-planning-p))
+ (time-less-p
+ (org-time-string-to-time match)
+ (org-time-string-to-time date)))))))
(message "%d entries before %s"
(org-occur regexp nil callback) date)))
@@ -17501,12 +17502,13 @@ both scheduled and deadline timestamps."
(regexp (org-re-timestamp org-ts-type))
(callback
`(lambda ()
- (and ,(if (memq org-ts-type '(active inactive all))
- '(eq (org-element-type (org-element-context)) 'timestamp)
- '(org-at-planning-p))
- (not (time-less-p
- (org-time-string-to-time (match-string 1))
- (org-time-string-to-time date)))))))
+ (let ((match (match-string 1)))
+ (and ,(if (memq org-ts-type '(active inactive all))
+ '(eq (org-element-type (org-element-context)) 'timestamp)
+ '(org-at-planning-p))
+ (not (time-less-p
+ (org-time-string-to-time match)
+ (org-time-string-to-time date))))))))
(message "%d entries after %s"
(org-occur regexp nil callback) date)))