summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Strey <mstrey@strey.biz>2016-04-08 14:03:30 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-04-08 23:12:42 +0200
commit0fac70ea898c7d8b2718f73515d29a7877e87bd6 (patch)
tree54f9c7a7f4f6f9515a7f3ac02491499a1e095d16
parentea98632e3b6568c096b760f7351658d110cb1930 (diff)
downloadorg-mode-0fac70ea898c7d8b2718f73515d29a7877e87bd6.tar.gz
org.el: Fix bug from switch to lexical binding
* lisp/org.el (org-check-dates-range): Fix a bug introduces with the switch to lexical binding in commit 1f49e9fdfd8b527377b5592bd65ad3be6abb9e6a. This change fixed the following bug: C-c \ D leads to error message "Symbol's value as variable is void: start-date". TINYCHANGE
-rw-r--r--lisp/org.el25
1 files changed, 13 insertions, 12 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 7842b2f..ec13566 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17476,18 +17476,19 @@ both scheduled and deadline timestamps."
(let ((case-fold-search nil)
(regexp (org-re-timestamp org-ts-type))
(callback
- `(lambda ()
- (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 start-date)))
- (time-less-p
- (org-time-string-to-time match)
- (org-time-string-to-time end-date)))))))
+ (let ((type org-ts-type))
+ (lambda ()
+ (let ((match (match-string 1)))
+ (and
+ (if (memq 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 start-date)))
+ (time-less-p
+ (org-time-string-to-time match)
+ (org-time-string-to-time end-date))))))))
(message "%d entries between %s and %s"
(org-occur regexp nil callback) start-date end-date)))