emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: Expanding highlighted nodes


From: Carsten Dominik
Subject: Re: [Orgmode] Re: Expanding highlighted nodes
Date: Tue, 24 Jun 2008 18:35:19 +0200


On Jun 24, 2008, at 5:48 PM, T. Short wrote:

Carsten Dominik <dominik <at> uva.nl> writes:

On Jun 23, 2008, at 7:50 PM, T. Short wrote:

Is there a way to expand highlighted nodes? I really like the tags
tree (C-c \)
and the TODO tree (C-c C-v). After either of these, I'd like to expand
everything under the highlighted nodes.

Not really.  You might want to look into the new mapping API which
would make it easy
to implement something like this.


Here's a way to expand highlighted areas that works with C-c \ and C- c C-v and
other highlighted sparse trees:

(defun org-expand-highlights ()
"Expand (cycle) highlighted tree nodes"
 (interactive)
 (dolist (highlight org-occur-highlights)
   (goto-char (overlay-start highlight))
   (org-cycle)))

Note that I barely know emacs lisp, so this may be clumsy. It appears to work
well enough for me. It does leave the node following highlighted.

- ts

Well, nice! The only problem is hat it is an extra comment, and I don't have a good hook for you where to put this. So you need to call two separate commands to make this happen. If you don't mind this, then you are done.

If the matching entry has children, the org-cycle will only show the children's heading, not the whole subtree. You might want to call it twice, or try a different approach using org-back-to-heading and org- show-subtree.

HTH

- Carsten





reply via email to

[Prev in Thread] Current Thread [Next in Thread]