emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Expanding highlighted nodes
@ 2008-06-23 17:50 T. Short
  2008-06-24  6:31 ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: T. Short @ 2008-06-23 17:50 UTC (permalink / raw)
  To: emacs-orgmode

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.

- ts

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Expanding highlighted nodes
  2008-06-23 17:50 Expanding highlighted nodes T. Short
@ 2008-06-24  6:31 ` Carsten Dominik
  2008-06-24 15:48   ` T. Short
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2008-06-24  6:31 UTC (permalink / raw)
  To: T. Short; +Cc: emacs-orgmode


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.

- Carsten

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Expanding highlighted nodes
  2008-06-24  6:31 ` Carsten Dominik
@ 2008-06-24 15:48   ` T. Short
  2008-06-24 16:35     ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: T. Short @ 2008-06-24 15:48 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re: Expanding highlighted nodes
  2008-06-24 15:48   ` T. Short
@ 2008-06-24 16:35     ` Carsten Dominik
  2008-06-24 16:43       ` T. Short
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2008-06-24 16:35 UTC (permalink / raw)
  To: T. Short; +Cc: emacs-orgmode


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Expanding highlighted nodes
  2008-06-24 16:35     ` Carsten Dominik
@ 2008-06-24 16:43       ` T. Short
  0 siblings, 0 replies; 5+ messages in thread
From: T. Short @ 2008-06-24 16:43 UTC (permalink / raw)
  To: emacs-orgmode


> 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.

Thanks, Carsten. I like it as a separate command. Mostly, I like the plain
versions of C-c C-v (and friends) but like the idea of expanding as needed. And,
this seems to give me that.

> 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.

I may play with that, but just having the children's headings is sufficient for
most of my org files.

- ts
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-06-24 16:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-23 17:50 Expanding highlighted nodes T. Short
2008-06-24  6:31 ` Carsten Dominik
2008-06-24 15:48   ` T. Short
2008-06-24 16:35     ` Carsten Dominik
2008-06-24 16:43       ` T. Short

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).