From: Max Mikhanosha <max@openchat.com>
To: Kevin Buchs <kevin.buchs.junk@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: shortcuts to hide nearest heading or sparse tree
Date: Sun, 02 Oct 2011 09:53:22 -0400 [thread overview]
Message-ID: <87zkhj33fx.wl%max@openchat.com> (raw)
In-Reply-To: <CAEqjYhu_A5Z2TqarAdY9cV35Chfz5=pgmJKs-Vs9P0mnQPyn5Q@mail.gmail.com>
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)))
prev parent reply other threads:[~2011-10-02 13:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-16 22:32 shortcuts to hide nearest heading or sparse tree Kevin Buchs
2011-09-25 0:55 ` Kevin Buchs
2011-10-02 13:53 ` Max Mikhanosha [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zkhj33fx.wl%max@openchat.com \
--to=max@openchat.com \
--cc=emacs-orgmode@gnu.org \
--cc=kevin.buchs.junk@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.