emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Adam Spiers <orgmode@adamspiers.org>
To: emacs-orgmode@gnu.org
Subject: Re: FR: headline iteration API
Date: Tue, 10 Jun 2008 11:28:44 +0100	[thread overview]
Message-ID: <20080610102844.GG5498@atlantic.linksys.moosehall> (raw)
In-Reply-To: <8763spclpm.fsf@gmail.com>

On Wed, Jun 04, 2008 at 04:35:01PM +0200, Daniel Clemente wrote:
> Hi,
>   I find this very interesting. Some ideas:
> 
> - Maybe it could provide access not only to the headlines, but to
>   the headlines of the headlines, and of their headlines, etc. In
>   fact, access to the whole tree. This would allow batch processing
>   of any contents.

Absolutely - that was a core part of the intent of my proposal; I
probably didn't make that clear enough.

> As a plus, each header would get a path (like XPath in XML, or DOM
> in XHTML) and would be addressable. Maybe useful for links.

Whilst borrowing some of the XPath syntax would be an extremely cool
way of making content addressable, I do think it's a nice-to-have
which is separate to having an iteration API.  Maybe later on the API
could be extended to only apply to subtrees matching an XPath-like
query, but that really would be icing on the cake.  I feel that the
biggest wins (and very big too, IMHO) would come from a simple
iteration API.

> - An API would be useful not only to generate reports, etc. like in your examples, but also to execute actions on each header; for instance „export“ each header, „delete“ it, ... (And now with latest version, each header can have different export options)

Agreed - it would open up many options for batch processing as well as
the reporting examples I gave before.  I would personally use it to
convert some of my tags into properties.  For instance I have tags
like 'sub60', 'sub2' to indicate that I estimate a task will take 60
minutes or 2 hours maximum, respectively.  They could be converted
into the effort estimation property.

> - Of course, this is already possible by going through the file looking for headers; an API would make iteration easier, like with mapcar 

Yes.  There will be many intricacies involved in iteration, and
probably only Carsten knows them all - without an API we would
individually be reinventing the same wheel over and over ... badly.

  reply	other threads:[~2008-06-10 10:28 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 [this message]
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
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=20080610102844.GG5498@atlantic.linksys.moosehall \
    --to=orgmode@adamspiers.org \
    --cc=emacs-orgmode@gnu.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).