At Sat, 24 Sep 2011 19:55:37 -0500, Kevin Buchs wrote: > I have been studying extensively and have not found a quick way to hide the > nearest heading (which > contains point) as well as the entire sparse tree. I often have two or more > sparse trees open as I go > look for information elsewhere and then want to return to the place I was at. > So, can I be lazy and > do these operations with a few keys?
C-c C-u then M-x hide-subtree would close parent heading.. You can do (defun close-parent-heading () (interactive) (outline-up-heading 1) (hide-subtree)) then bind it to a key. If you want to hide parent headings until you reach certain condition, then you'll have to write a more complicated function like so: (defun fold-until-tagged-blah () "Fold headings containing point upward until heading tagged :blah" (interactive) (org-back-to-heading) (let (done) (while (not done) (cond ((member "blah" (org-get-tags-at nil t)) (setq done t)) ((not (org-up-heading-safe)) (setq done t)))) (org-hide-subtree)))