From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Google Summer of Code -- 3 Org projects for our first participation! Date: Sat, 05 May 2012 11:36:59 +0200 Message-ID: <87wr4r55qc.fsf@gmail.com> References: <8762cpad2q.fsf@gnu.org> <4F9653BD.7030201@wilkesley.net> <87obqh8s6m.fsf@googlemail.com> <4F98A7F0.6080405@neilsmithline.com> <87mx5zrklf.fsf@altern.org> <4F9C8937.2030709@neilsmithline.com> <87ipgij2k5.fsf@altern.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:46538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQbT1-0006Du-Fn for emacs-orgmode@gnu.org; Sat, 05 May 2012 05:39:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQbSz-0001kb-MB for emacs-orgmode@gnu.org; Sat, 05 May 2012 05:39:55 -0400 In-Reply-To: (Neil Smithline's message of "Fri, 4 May 2012 20:19:31 -0400") 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: Neil Smithline Cc: Bastien , emacs-orgmode@gnu.org Hello, Neil Smithline writes: > I've looked at org-element.el and don't really see how it will make writing > other Org Mode to HTML converter easier. org-element.el is, well it's > elisp. Very elispy. No surprise but I'm not sure that it can easily be > converted to another language. > > Is Nicolas working from a grammar? Since org-element can parse 98%[1] of Org syntax, there must be a grammar defined somewhere. When I started org-element, there was no structural definition of Org syntax (there wasn't even a full list of syntactic objects). Now, org-element is the grammar embodied in elisp. Alas, I have no plan to formalize it. Though, I agree that it would be a great thing to have in order to implement equivalent parsers in other languages. If someone wants to study org-element and extract a formal grammar out of it, I will gladly help him in the process. Otherwise, you can use the intermediary representation of an Org document. org-element can produce the representation and read the representation to produce an Org document. #+begin_src emacs-lisp (org-element-interpret-data '(org-data nil (headline (:level 1 :title ("It works") :priority ?A :todo-keyword "TODO" :tags ("test")) (section nil (center-block nil (paragraph nil "Really")))))) #+end_src Thus, you may only need to write converters from that representation to another syntax (like HTML). That's the purpose of org-export and its back-ends. Regards, [1] I still don't know what to do with "under\_line": there is no `kludge' object type so far (!). -- Nicolas Goaziou