[Top][All Lists]

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

[PATCH] Re: Subject: Bug: Org-Clock-Out in indirect buffer error after r

From: Ihor Radchenko
Subject: [PATCH] Re: Subject: Bug: Org-Clock-Out in indirect buffer error after refile [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)]
Date: Fri, 30 Jul 2021 22:23:59 +0800

Eddie Drury <eddie.drury@gmail.com> writes:

> I have followed those steps and that is the same behaviour I get.
> The expected behaviour is for it to clock out of the subtree, instead of
> giving the "Clock start time is gone" error.

I can also reproduce. The fix is attached.


>From 4ad92b3efc8717e3ca871ab83bcb5e23e8faeb35 Mon Sep 17 00:00:00 2001
From: Ihor Radchenko <yantar92@gmail.com>
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 
 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 
             (>= marker beg) (< marker end))
     (push (cons marker (- marker beg)) org-markers-to-move)))

reply via email to

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