emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eddward DeVilla" <eddward@gmail.com>
To: Adam Spiers <orgmode@adamspiers.org>,
	org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: FR: headline iteration API
Date: Wed, 11 Jun 2008 20:09:50 -0500	[thread overview]
Message-ID: <b71b18520806111809v66200b19q6b3be213dbc241d@mail.gmail.com> (raw)
In-Reply-To: <b71b18520806111015n530c4621r75e4296ea60efea4@mail.gmail.com>

On Wed, Jun 11, 2008 at 12:15 PM, Eddward DeVilla <eddward@gmail.com> 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!

Edd

  reply	other threads:[~2008-06-12  1:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-30 12:46 FR: headline iteration API Adam Spiers
2008-06-04 14:35 ` Daniel Clemente
2008-06-10 10:28   ` Adam Spiers
2008-06-12  6:46     ` Carsten Dominik
2008-06-12 10:16       ` Adam Spiers
2008-06-12 10:51         ` Carsten Dominik
2008-06-11  6:57 ` Dominik, C.
2008-06-11 11:06   ` Adam Spiers
2008-06-11 17:15     ` Eddward DeVilla
2008-06-12  1:09       ` Eddward DeVilla [this message]
2008-07-16 15:06       ` Max Mikhanosha

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b71b18520806111809v66200b19q6b3be213dbc241d@mail.gmail.com \
    --to=eddward@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=orgmode@adamspiers.org \
    /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 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).