From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: the "right way" to build OMPL export and import Date: Fri, 26 Apr 2013 23:49:59 +0200 Message-ID: <87obd155dk.fsf@gmail.com> References: <87y5c5ou7h.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVqWr-0007Ny-5O for emacs-orgmode@gnu.org; Fri, 26 Apr 2013 17:50:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVqWp-0005GN-8N for emacs-orgmode@gnu.org; Fri, 26 Apr 2013 17:50:05 -0400 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:59521) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVqWo-0005D3-R0 for emacs-orgmode@gnu.org; Fri, 26 Apr 2013 17:50:02 -0400 Received: by mail-wi0-f169.google.com with SMTP id h11so1244456wiv.0 for ; Fri, 26 Apr 2013 14:50:01 -0700 (PDT) In-Reply-To: <87y5c5ou7h.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Fri, 26 Apr 2013 14:30:58 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Abrahamsen Cc: emacs-orgmode@gnu.org Hello, Eric Abrahamsen writes: > I'm not sure the general export engine is going to be of much use, > since XML is so completely flexible, but you'll definitely want to > build it on top of the internal parser. It would be a bad idea not to use the export framework, unless you want to reinvent the wheel (e.g., re-implementing skipping of :noexport: tags). > Luckily, the parser turns an org subtree into a parse tree, and the > function `xml-print' turns a parse tree into XML. They're not quite the > same parse tree, but I guess you'll want to do something like this: > > > #+BEGIN_SRC org > ,* My Great Playlist > ,** The Cold Cold Ground.mp3 > :PROPERTIES: > :OPML_TYPE: song > :OPML_F: Tom Waits - The Cold Cold Ground > :END: > ,** Don't Eat the Yellow Snow.mp3 > :PROPERTIES: > :OPML_TYPE: song > :OPML_F: Frank Zappa - Don't Eat the Yellow Snow > :END: > #+END_SRC > > > | > | > org-element--parse-elements Please use `org-element-parse-buffer' instead. As the two consecutive hyphens suggest, this is an internal function. Regards, -- Nicolas Goaziou