0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 18:36:26 +00:00

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
This commit is contained in:
Ihor Radchenko 2021-12-19 21:05:37 +08:00
parent 513ab7c48c
commit 5c14a17344
No known key found for this signature in database
GPG key ID: 6470762A7DA11D8B

View file

@ -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))