From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dominik, C." Subject: RE: FR: headline iteration API Date: Wed, 11 Jun 2008 08:57:39 +0200 Message-ID: <9592BB6CDB1CEB48826BE86ACD71FA996ABF8D@kwik.ic.uva.nl> References: <20080530124619.GB9520@atlantic.linksys.moosehall> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1101718182==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K6KII-0000dO-4Y for emacs-orgmode@gnu.org; Wed, 11 Jun 2008 02:58:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K6KIG-0000d3-Bj for emacs-orgmode@gnu.org; Wed, 11 Jun 2008 02:58:53 -0400 Received: from [199.232.76.173] (port=35308 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K6KIG-0000d0-5Z for emacs-orgmode@gnu.org; Wed, 11 Jun 2008 02:58:52 -0400 Received: from mx20.gnu.org ([199.232.41.8]:14347) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K6KIF-0003c4-GJ for emacs-orgmode@gnu.org; Wed, 11 Jun 2008 02:58:51 -0400 Received: from kwik.ic.uva.nl ([146.50.98.168]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K6KIE-00051O-Ex for emacs-orgmode@gnu.org; Wed, 11 Jun 2008 02:58:50 -0400 Content-class: urn:content-classes:message 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: Adam Spiers , org-mode mailing list This is a multi-part message in MIME format. --===============1101718182== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C8CB90.99C09428" This is a multi-part message in MIME format. ------_=_NextPart_001_01C8CB90.99C09428 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Adam and others, I do like the idea of an API to iterate of entries and outline trees. For now, I am following this discussion to see what ideas pop up. When I find the time, something will be implemented. - Carsten -----Original Message----- From: emacs-orgmode-bounces+dominik=3Dscience.uva.nl@gnu.org on behalf = of Adam Spiers Sent: Fri 5/30/2008 2:46 PM To: org-mode mailing list Subject: [Orgmode] FR: headline iteration API =20 Hi all, I would like to propose a new extensibility feature: an API for iterating over all the headlines in a given buffer/file or set of buffers/files. In a manner similar to mapcar, this would allow you to execute an elisp function for each headline which could do anything you want. It would *not* have any mandatory side-effects such as modifying any buffer etc. - that would be left to the extension developer to do. Having said that, an API set of helper functions for things like "increase the priority of this headline" or "add a tag to this headline" would enrich the possible applications, although those helper functions probably mostly exist already, even if they are not explicitly documented as an API at the moment? Anyway, example use cases: - Generating custom reports containing arbitrary combinations of things like the following: - (count of number of) items ... - grouped by TODO keyword state - grouped by tag - grouped by category - grouped by "area of responsibility" - grouped by priority - with a scheduled date/time - with a scheduled date/time in the past - with a scheduled date/time within a certain period - with a deadline - with a deadline missed - with a deadline within a certain period - amount of time scheduled for a particular type of TODO/tag/category/priority (e.g. to ensure that you are planning to spend your time evenly across various areas of responsibility, this would greatly assist with GTD-like "30,000ft and above" reviews) - actions taken during minuting of a meeting, grouped by owner I am sure there are many other really cool ideas which the community could come up with. Reports could even be auto-generated via `after-save-hook' or similar. Obviously the agenda generation code has a lot of sophisticated iteration capabilities already built in - without looking at the code, I am wildly guessing that with some refactoring this logic could maybe be reused, so that a new headline iteration API would support existing mechanisms such as tag searches, org-agenda-skip, and sorting? If so, IMHO that would be really amazingly powerful :-) Would be very interested in everyone's thoughts. Thanks! Adam _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ------_=_NextPart_001_01C8CB90.99C09428 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: [Orgmode] FR: headline iteration API

Hi Adam and others,

I do like the idea of an API to iterate of entries and outline = trees.
For now, I am following this discussion to see what ideas pop up.
When I find the time, something will be implemented.

- Carsten

-----Original Message-----
From: emacs-orgmode-bounces+dominik=3Dscience.uva.nl@gnu.org on behalf = of Adam Spiers
Sent: Fri 5/30/2008 2:46 PM
To: org-mode mailing list
Subject: [Orgmode] FR: headline iteration API

Hi all,

I would like to propose a new extensibility feature: an API for
iterating over all the headlines in a given buffer/file or set of
buffers/files.  In a manner similar to mapcar, this would allow you = to
execute an elisp function for each headline which could do anything
you want.  It would *not* have any mandatory side-effects such = as
modifying any buffer etc. - that would be left to the extension
developer to do.  Having said that, an API set of helper functions = for
things like "increase the priority of this headline" or = "add a tag to
this headline" would enrich the possible applications, although = those
helper functions probably mostly exist already, even if they are not
explicitly documented as an API at the moment?

Anyway, example use cases:

  - Generating custom reports containing arbitrary combinations
    of things like the following:

    - (count of number of) items ...
      - grouped by TODO keyword state
      - grouped by tag
      - grouped by category
      - grouped by "area of = responsibility"
      - grouped by priority
      - with a scheduled date/time
      - with a scheduled date/time in the = past
      - with a scheduled date/time within a = certain period
      - with a deadline
      - with a deadline missed
      - with a deadline within a certain = period

    - amount of time scheduled for a particular type = of
      TODO/tag/category/priority (e.g. to = ensure that you are planning
      to spend your time evenly across various = areas of
      responsibility, this would greatly assist = with GTD-like
      "30,000ft and above" = reviews)

    - actions taken during minuting of a meeting, grouped = by owner

I am sure there are many other really cool ideas which the community
could come up with.  Reports could even be auto-generated via
`after-save-hook' or similar.

Obviously the agenda generation code has a lot of sophisticated
iteration capabilities already built in - without looking at the = code,
I am wildly guessing that with some refactoring this logic could = maybe
be reused, so that a new headline iteration API would support = existing
mechanisms such as tag searches, org-agenda-skip, and sorting?  If = so,
IMHO that would be really amazingly powerful :-)

Would be very interested in everyone's thoughts.  Thanks!
Adam


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists= .gnu.org/mailman/listinfo/emacs-orgmode

------_=_NextPart_001_01C8CB90.99C09428-- --===============1101718182== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1101718182==--