Переглянути джерело

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.fsf@posteo.de
Ihor Radchenko 3 роки тому
батько
коміт
5c14a17344
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      lisp/org-clock.el

+ 1 - 1
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))