forked from mirrors/org-mode
org-find-open-clocks: Fix false positives
* lisp/org-clock.el (org-find-open-clocks): Ensure that we only match actual clock elements, not everything matching `org-clock-re', including clocks inside verbatim environments.
This commit is contained in:
parent
759676b308
commit
f2dd1eea41
|
@ -921,9 +921,10 @@ If CLOCK-SOUND is non-nil, it overrides `org-clock-sound'."
|
|||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward org-clock-re nil t)
|
||||
(push (cons (copy-marker (match-end 1) t)
|
||||
(org-time-string-to-time (match-string 1)))
|
||||
clocks))))
|
||||
(when (org-element-type-p (org-element-at-point) 'clock)
|
||||
(push (cons (copy-marker (match-end 1) t)
|
||||
(org-time-string-to-time (match-string 1)))
|
||||
clocks)))))
|
||||
clocks))
|
||||
|
||||
(defsubst org-is-active-clock (clock)
|
||||
|
|
Loading…
Reference in New Issue