From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: Re: [CEDET-devel] Org-mode Date: Thu, 04 Nov 2010 23:34:36 +0530 Message-ID: <8139rht16z.fsf@gmail.com> References: <4CD15272.2080303@siege-engine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=49878 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PE4B9-0000oU-TW for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 14:04:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PE4B8-0003vV-FB for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 14:04:51 -0400 Received: from mail-iw0-f169.google.com ([209.85.214.169]:44335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PE4B8-0003vP-7s for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 14:04:50 -0400 Received: by iwn9 with SMTP id 9so1860675iwn.0 for ; Thu, 04 Nov 2010 11:04:49 -0700 (PDT) In-Reply-To: (Lennart Borgman's message of "Thu, 4 Nov 2010 16:45:33 +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: Lennart Borgman Cc: Konrad Scorciapino , "Eric M. Ludlam" , Org Mode , cedet-devel@lists.sourceforge.net, Carsten Dominik Lennart Borgman writes: > On Thu, Nov 4, 2010 at 3:37 PM, Carsten Dominik > wrote: >> >> On Nov 3, 2010, at 1:34 PM, Lennart Borgman wrote: >> >>> On Wed, Nov 3, 2010 at 1:15 PM, Eric M. Ludlam >>> wrote: >>>> >>>> On 10/30/2010 03:45 AM, Konrad Scorciapino wrote: >>>>> >>>>> Hey! >>>>> >>>>> Is anybody working on Org-mode? My main interest is to build a parser= to >>>>> manipulate the nodes of the resulting tree and save them back. Tips on >>>>> how to get started are also welcome. >>>>> >>>> >>>> I know of no one doing that. =A0I don't know what org-mode's code >>>> structure is like, but I'd assume it already has a parser, and you cou= ld >>>> adapt the output to Semantic tag format. >>>> >>>> The HTML parser also handles arbitrary text so you could look in >>>> semantic-html to see what sort of things that =A0does. >>> >>> There are different exporters for org-mode. >>> >>> Currently we are trying to make an exporter to ODT files. I think a >>> parser would come in handy. >> >> >> org-html.el is probably the best starting point to make a complete parse= r. >> =A0It does a very detailed analysis of the text. >> >> We should have built all the exporters on the same parser - unfortunatel= y we >> did not. =A0One of the hard to correct mistakes we made in early develop= ment. > > Then perhaps the best we can do now is starting by breaking up > org-hml.el in the parser and a callback function for writing the > export. After that we can add new exports by adding new callback > functions. The suggested refactoring could be a side-effect of org-odt.el that is shaping up from org-html.el. Note that the refactoring happens or atleast is visible in org-odt.el (which I control) and *not* in org-html.el (which is in the field) The main challenge with breaking up org-html.el first and then say plugging in org-odt.el to that later is: 1. Code-churn that it would create in org-html.el 2. Proving that *nothing* in HTML export actually breaks. Carsten would like to avoid (1) - he might want to go with one bit commit and (naturally) shift the responsibility of (2) to the committer. So a committer has one more thing he needs to be concerned about. I do see some regression tests for html exporter and I am unsure how *complete* they are. What would have really made things easier is the following: 1. One Org file in repo that has *all* the Org-specific markups. 2. One HTML file that is a exported from this Org file which is re-checked in as and when the org-html.el changes it's markups. Everytime something changes in the exporter one just diffs the *new* HTML file with the one in the repo and be able to say with assured confidence that something has improved or broken. In some sense, test.org in my repo does this today: - Base URL: http://repo.or.cz/w/org-mode/oo.git/blob_plain/HEAD Rel URL: :/contrib/odt/files/test.org What I believe I am recording here is that org-odt.el moves the Org export engine in the "right" direction without me having to sell to Carsten the need for a complete refactoring of org-html. >From my experience, re-factoring is all good. But at the end of the day if it is going to delay something useful or places overly much responsibilities on regression and validation it is better avoided. Then there is also this question of how many more export formats that Org could be possibly have in the future ... If there aren'y many that we foresee maybe the prudent thing to do is to be not overly much concerned about refactoring the parsing engine. Lennart=20 Btw, can you summarize what UseCase in cedet-devel triggered this line of thought ... Just my 2 cents here. Sorry if I sound too overboard or venturing in to the speculative realm. Jambunathan K.