branch: externals/org
commit 5c14a173442adbc6b373c1042f0f3d50605227b7
Author: Ihor Radchenko <yanta...@gmail.com>
Commit: Ihor Radchenko <yanta...@gmail.com>

    org-clock.el: Consider clocking-in in an empty narrowed buffer
    
    * lisp/org-clock.el (org-clock-in): Fix wrong calculation of
    TARGET-POS when we are inside an empty narrowing.
    
    Fixes https://orgmode.org/list/87tufktz5z....@posteo.de
---
 lisp/org-clock.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index e2c2688e14..87912c27a6 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1322,7 +1322,7 @@ the default behavior."
       ;; Clock in at which position?
       (setq target-pos
            (if (and (eobp) (not (org-at-heading-p)))
-               (point-at-bol 0)
+               (org-with-wide-buffer (point-at-bol 0))
              (point)))
       (save-excursion
        (when (and selected-task (marker-buffer selected-task))

Reply via email to