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
1f49e9fdfd
.
This change fixed the following bug: C-c \ D leads to error message "Symbol's value as variable is void: start-date".
TINYCHANGE
This commit is contained in:
parent
ea98632e3b
commit
0fac70ea89
11
lisp/org.el
11
lisp/org.el
|
@ -17476,18 +17476,19 @@ both scheduled and deadline timestamps."
|
||||||
(let ((case-fold-search nil)
|
(let ((case-fold-search nil)
|
||||||
(regexp (org-re-timestamp org-ts-type))
|
(regexp (org-re-timestamp org-ts-type))
|
||||||
(callback
|
(callback
|
||||||
`(lambda ()
|
(let ((type org-ts-type))
|
||||||
|
(lambda ()
|
||||||
(let ((match (match-string 1)))
|
(let ((match (match-string 1)))
|
||||||
(and
|
(and
|
||||||
,(if (memq org-ts-type '(active inactive all))
|
(if (memq type '(active inactive all))
|
||||||
'(eq (org-element-type (org-element-context)) 'timestamp)
|
(eq (org-element-type (org-element-context)) 'timestamp)
|
||||||
'(org-at-planning-p))
|
(org-at-planning-p))
|
||||||
(not (time-less-p
|
(not (time-less-p
|
||||||
(org-time-string-to-time match)
|
(org-time-string-to-time match)
|
||||||
(org-time-string-to-time start-date)))
|
(org-time-string-to-time start-date)))
|
||||||
(time-less-p
|
(time-less-p
|
||||||
(org-time-string-to-time match)
|
(org-time-string-to-time match)
|
||||||
(org-time-string-to-time end-date)))))))
|
(org-time-string-to-time end-date))))))))
|
||||||
(message "%d entries between %s and %s"
|
(message "%d entries between %s and %s"
|
||||||
(org-occur regexp nil callback) start-date end-date)))
|
(org-occur regexp nil callback) start-date end-date)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue