Explicitly set visibility when jumping to current clock in Org mode

This is another try to reduce the number of Org items that are unfolded
when jumping to the current clock.  This is particularly important with
periodic items with many subtasks, because unfolding all siblings might
be irritating (at least to me).
This commit is contained in:
Daniel Borchmann 2024-11-30 15:26:07 +01:00
parent ff868b57b4
commit 311d6e81b6
No known key found for this signature in database
GPG Key ID: 784AA8DF0CCDF625

View File

@ -1684,10 +1684,9 @@ clocked-in tasks to jump to."
(select-window target-window)
(if (or (< m (point-min)) (> m (point-max))) (widen))
(goto-char m)
(org-fold-reveal)
(org-fold-hide-drawer-all)
(db/org-goto-first-open-checkbox-in-headline :silent)
(org-fold-reveal)
(org-fold-show-set-visibility 'ancestors)
(if recent
(message "No running clock, this is the most recently clocked task"))
(run-hooks 'org-clock-goto-hook))