emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: Konrad Scorciapino <scorciapino@gmail.com>,
	"Eric M. Ludlam" <eric@siege-engine.com>,
	Org Mode <emacs-orgmode@gnu.org>,
	cedet-devel@lists.sourceforge.net,
	Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: Re: [CEDET-devel] Org-mode
Date: Thu, 04 Nov 2010 23:34:36 +0530	[thread overview]
Message-ID: <8139rht16z.fsf@gmail.com> (raw)
In-Reply-To: <AANLkTikFEJk2=kq1Lrmitzg2Om3_t59if3HhZMWtReg0@mail.gmail.com> (Lennart Borgman's message of "Thu, 4 Nov 2010 16:45:33 +0100")

Lennart Borgman <lennart.borgman@gmail.com> writes:

> On Thu, Nov 4, 2010 at 3:37 PM, Carsten Dominik
> <carsten.dominik@gmail.com> wrote:
>>
>> On Nov 3, 2010, at 1:34 PM, Lennart Borgman wrote:
>>
>>> On Wed, Nov 3, 2010 at 1:15 PM, Eric M. Ludlam <eric@siege-engine.com>
>>> 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.  I don't know what org-mode's code
>>>> structure is like, but I'd assume it already has a parser, and you could
>>>> 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  does.
>>>
>>> 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 parser.
>>  It does a very detailed analysis of the text.
>>
>> We should have built all the exporters on the same parser - unfortunately we
>> did not.  One of the hard to correct mistakes we made in early development.
>
> 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 

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.

  parent reply	other threads:[~2010-11-04 18:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTinWfjJ_t=1E8=Xmy2T+dThzC9N8wBoKj+Nw7XS9@mail.gmail.com>
     [not found] ` <4CD15272.2080303@siege-engine.com>
2010-11-03 12:34   ` Org-mode Lennart Borgman
2010-11-04 14:37     ` Re: [CEDET-devel] Org-mode Carsten Dominik
2010-11-04 15:45       ` [Orgmode] Org-mode Lennart Borgman
2010-11-04 15:50         ` Re: [CEDET-devel] Org-mode Carsten Dominik
2010-11-04 18:04         ` Jambunathan K [this message]
2010-11-04 18:44           ` [Orgmode] Org-mode Lennart Borgman
2010-11-04 19:16           ` Re: [CEDET-devel] Org-mode Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8139rht16z.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=carsten.dominik@gmail.com \
    --cc=cedet-devel@lists.sourceforge.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric@siege-engine.com \
    --cc=lennart.borgman@gmail.com \
    --cc=scorciapino@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).