From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: org to lisp Date: Wed, 23 Jul 2008 20:09:02 +0100 Message-ID: <20080723190902.GA6797@stats.ox.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KLji0-0001SD-9X for emacs-orgmode@gnu.org; Wed, 23 Jul 2008 15:09:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KLjhx-0001Ne-VA for emacs-orgmode@gnu.org; Wed, 23 Jul 2008 15:09:07 -0400 Received: from [199.232.76.173] (port=37804 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KLjhx-0001ND-PP for emacs-orgmode@gnu.org; Wed, 23 Jul 2008 15:09:05 -0400 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:65272) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KLjhx-0004qV-Bb for emacs-orgmode@gnu.org; Wed, 23 Jul 2008 15:09:05 -0400 Received: from blackcap.stats.ox.ac.uk (blackcap.stats [163.1.210.5]) by markov.stats.ox.ac.uk (8.13.6/8.13.6) with ESMTP id m6NJ93va019448 for ; Wed, 23 Jul 2008 20:09:03 +0100 (BST) Content-Disposition: inline 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: emacs org-mode mailing list Is there an existing function that will convert an org syntax buffer into a corresponding (recursive) lisp data structure? (preserving all the metadata of each heading in some way?) I guess I'm thinking of structs in C, but is this a natural thing to do in lisp? I think the existence of such code might have been mentioned in Carsten's talk. If so, then my second question is whether there's a recursive 'mapping' function, to apply a function at each node of such a tree (and return some recursive structure containing the results of those function calls) (R users: I mean like rapply and dendrapply). My understanding is that org-map-entries returns a flat, rather than a recursive, list, and that it doesn't create a recursive representation of the buffer in memory. But if it's the case that I simply haven't tried hard enough to understand the code, please just say so! My current motivation is to create a directory/filesystem tree corresponding to the org tree. But I don't want to try to write an org-buffer traversal function if there's existing code written by non-beginners. DAn