[Top][All Lists]

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

Re: [Orgmode] FR: headline iteration API

From: Eddward DeVilla
Subject: Re: [Orgmode] FR: headline iteration API
Date: Wed, 11 Jun 2008 20:09:50 -0500

On Wed, Jun 11, 2008 at 12:15 PM, Eddward DeVilla <address@hidden> wrote:
> Are the functions behind C-c C-N, C-c C-p, C-c C-f, C-c C-b & C-c C-u
> available?  Seems you could add a function for going to the first
> child.  As long as that, C-c C-f & C-c C-b all return something to let
> you know there isn't a next, this should be pretty complete.
> I guess all you would need would be the following functions which
> would move to the correct place or return something to say there isn't
> a next/parent/child/sibling etc to signal the end of iteration.
>  - doc traversal
>    - first-item
>      Go to the first item in the file.
>    - current-item
>      Go to the beginning of the item containing the cursor.
>    - next-item
>      Go to the item after the current one.
>    - previous-item
>      Go to item before the current one
>  - tree traversal
>    - parent-item
>      Go to the parent item of the current item
>    - first-child-item
>      Go to the first item contained in the current item
>    - next-sibling-item
>      Go to the next item that has the same parent
>    - previous-sibling-item
>      Go to the previous item that has the same parent
> This ought to be enough to try to implement anything else on top of
> it.  Did I miss something?

Just to respond to myself, I did miss something.  If we want a
convenient base api, we probably ought to have an equivalent to the
doc traversal functions for iterating through all the items in the
agenda files.  I'm not sure what the correct behavior should be in
that case if you start in a file that is not in the list of agenda
files.  I was precise about the sibling functions to handle the
following if you call next-sibling-item from meanie.

* eenie
*** meanie
** minie
* Hey Moe!


reply via email to

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