From 311d6e81b6a5e65aa2696f095bbcdd974f69b218 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sat, 30 Nov 2024 15:26:07 +0100 Subject: [PATCH] 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). --- site-lisp/db-org.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/site-lisp/db-org.el b/site-lisp/db-org.el index 7de03bc..54fa7c1 100644 --- a/site-lisp/db-org.el +++ b/site-lisp/db-org.el @@ -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))