From 5b190c9eca2446feac4c20145bc55dc5197a0ea3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 24 Nov 2019 19:20:28 -0500 Subject: [PATCH] Unfold hidden subtree after doom-completing-read-org-headings Affects doom/help* commands, as well as +default/org-notes-headlines, and others (any command that uses doom-completing-read-org-headings to search org files). --- core/autoload/help.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index 0663fd161..75958ca5e 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -174,7 +174,12 @@ selection of all minor-modes, active or not." (cond ((functionp location) (funcall location)) (location - (goto-char location)))) + (goto-char location))) + (ignore-errors + (when (outline-invisible-p) + (save-excursion + (outline-previous-visible-heading 1) + (org-show-subtree))))) (user-error "Aborted")))) ;;;###autoload