From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Clemente Subject: Re: FR: headline iteration API Date: Wed, 04 Jun 2008 16:35:01 +0200 Message-ID: <8763spclpm.fsf@gmail.com> References: <20080530124619.GB9520@atlantic.linksys.moosehall> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K3u56-0004s8-Nm for emacs-orgmode@gnu.org; Wed, 04 Jun 2008 10:35:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K3u52-0004pV-C1 for emacs-orgmode@gnu.org; Wed, 04 Jun 2008 10:35:16 -0400 Received: from [199.232.76.173] (port=48877 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K3u51-0004pL-Ur for emacs-orgmode@gnu.org; Wed, 04 Jun 2008 10:35:12 -0400 Received: from fg-out-1718.google.com ([72.14.220.157]:55454) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K3u51-0001bw-Na for emacs-orgmode@gnu.org; Wed, 04 Jun 2008 10:35:12 -0400 Received: by fg-out-1718.google.com with SMTP id l26so82584fgb.30 for ; Wed, 04 Jun 2008 07:35:09 -0700 (PDT) In-Reply-To: <20080530124619.GB9520@atlantic.linksys.moosehall> (Adam Spiers's message of "Fri\, 30 May 2008 13\:46\:19 +0100") 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: org-mode mailing list Hi, I find this very interesting. Some ideas: - Maybe it could provide access not only to the headlines, but to the headl= ines of the headlines, and of their headlines, etc. In fact, access to the = whole tree. This would allow batch processing of any contents. As a plus, e= ach header would get a path (like XPath in XML, or DOM in XHTML) and would = be addressable. Maybe useful for links. - If there is an API to the content, applications can use data stored in or= g files in simple ways. For instance: =E2=80=9Efor all the headers with tag= AAAA, get the the subheaders except if they are DONE, and get the property= BBBB=E2=80=9C. I don't know the =E2=80=9Etree=E2=80=9C data structures in = Emacs Lisp, but I suppose that representing a whole org file as a LISP obje= ct would be cool; also for easy exporting and data interchange. - An API would be useful not only to generate reports, etc. like in your ex= amples, but also to execute actions on each header; for instance =E2=80=9Ee= xport=E2=80=9C each header, =E2=80=9Edelete=E2=80=9C it, ... (And now with = latest version, each header can have different export options) - Of course, this is already possible by going through the file looking for= headers; an API would make iteration easier, like with mapcar=20 And many more things... Daniel