emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org f2dd1eea41 093/101: org-find-open-clocks: Fix false


From: ELPA Syncer
Subject: [elpa] externals/org f2dd1eea41 093/101: org-find-open-clocks: Fix false positives
Date: Sat, 1 Jul 2023 09:59:17 -0400 (EDT)

branch: externals/org
commit f2dd1eea411b1b81fb8f7279c8504d8d9af9ed47
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    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.
---
 lisp/org-clock.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 62b488f4e5..264774032b 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]