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

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

[elpa] externals/org d3f587fadf: org-find-open-clocks: Fix recent bug in


From: ELPA Syncer
Subject: [elpa] externals/org d3f587fadf: org-find-open-clocks: Fix recent bug in handling of match data
Date: Sun, 30 Jul 2023 18:58:13 -0400 (EDT)

branch: externals/org
commit d3f587fadf3663674d3ef55a60a1cc6e88c862b7
Author: Kyle Meyer <kyle@kyleam.com>
Commit: Kyle Meyer <kyle@kyleam.com>

    org-find-open-clocks: Fix recent bug in handling of match data
    
    * lisp/org-clock.el (org-find-open-clocks): Prevent clock match data
    from being clobbered by downstream org-element-at-point call.
---
 lisp/org-clock.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 264774032b..e4727d06ee 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -921,7 +921,8 @@ 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)
-          (when (org-element-type-p (org-element-at-point) 'clock)
+          (when (save-match-data
+                  (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)))))



reply via email to

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