From 4ad92b3efc8717e3ca871ab83bcb5e23e8faeb35 Mon Sep 17 00:00:00 2001 Message-Id: <4ad92b3efc8717e3ca871ab83bcb5e23e8faeb35.1627654962.git.yantar92@gmail.com> From: Ihor Radchenko Date: Fri, 30 Jul 2021 22:16:02 +0800 Subject: [PATCH] Fix not updating org-clock-marker after refiling from indirect buffer * lisp/org.el (org-check-and-save-marker): Save markers in base buffer of indirect buffer in addition to markers in current buffer. Fixes bug reported in https://orgmode.org/list/CABa5=g4bvYQoTbBn96tFi9K827u_A+MweqYWWpib_tyFLBdG3g@mail.gmail.com/T/#t --- lisp/org.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index eca12a5e7..53fd5b7c7 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7877,7 +7877,8 @@ (defun org-check-and-save-marker (marker beg end) "Check if MARKER is between BEG and END. If yes, remember the marker and the distance to BEG." (when (and (marker-buffer marker) - (equal (marker-buffer marker) (current-buffer)) + (or (equal (marker-buffer marker) (current-buffer)) + (equal (marker-buffer marker) (buffer-base-buffer (current-buffer)))) (>= marker beg) (< marker end)) (push (cons marker (- marker beg)) org-markers-to-move))) -- 2.31.1