From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: Expanding highlighted nodes Date: Tue, 24 Jun 2008 18:35:19 +0200 Message-ID: <1621A8D0-BBED-4E9B-AC4B-12968DBA939E@uva.nl> References: <0DC559BA-8BCD-4E15-9C71-CD1CFAEC3183@uva.nl> Mime-Version: 1.0 (Apple Message framework v924) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KBBUL-00011z-W4 for emacs-orgmode@gnu.org; Tue, 24 Jun 2008 12:35:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KBBUK-00011H-5w for emacs-orgmode@gnu.org; Tue, 24 Jun 2008 12:35:25 -0400 Received: from [199.232.76.173] (port=32954 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KBBUK-00011D-1L for emacs-orgmode@gnu.org; Tue, 24 Jun 2008 12:35:24 -0400 Received: from korteweg.uva.nl ([146.50.98.70]:19442) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KBBUJ-0006g7-Jy for emacs-orgmode@gnu.org; Tue, 24 Jun 2008 12:35:23 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "T. Short" Cc: emacs-orgmode@gnu.org On Jun 24, 2008, at 5:48 PM, T. Short wrote: > Carsten Dominik 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