From b81a152d424f10647e34be7a9f818534d7b58396 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sat, 13 Jan 2018 12:49:43 +0100 Subject: [PATCH] [Org] Keep point and mark when iterating over clock lines and headlines --- site-lisp/db-org.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/site-lisp/db-org.el b/site-lisp/db-org.el index eec45d1..a9ba952 100644 --- a/site-lisp/db-org.el +++ b/site-lisp/db-org.el @@ -957,10 +957,12 @@ end of the file upwards." (cond ((match-end 2) ;; Two time stamps. - (funcall clockline-fn (match-string 2) (match-string 3))) + (save-mark-and-excursion + (funcall clockline-fn (match-string 2) (match-string 3)))) (t ;; A headline - (funcall headline-fn)))))))) + (save-mark-and-excursion + (funcall headline-fn))))))))) (defun db/org-clocking-time-in-range (tstart tend) "Return list of all tasks in the current buffer together with