From mboxrd@z Thu Jan 1 00:00:00 1970 From: flammable project Subject: Re: How to easily create a new export engine... Date: Tue, 3 Sep 2013 22:14:33 +0200 Message-ID: References: <20130903135112.GF22460@kuru.dyndns-at-home.com> <87mwnu2ecd.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c241e04b254204e580565f Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGwzk-0000bZ-1k for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 16:14:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGwzi-0002Kn-9B for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 16:14:35 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:56133) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGwzh-0002KQ-UY for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 16:14:34 -0400 Received: by mail-wi0-f172.google.com with SMTP id c10so3882125wiw.11 for ; Tue, 03 Sep 2013 13:14:33 -0700 (PDT) In-Reply-To: <87mwnu2ecd.fsf@gmail.com> 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org --001a11c241e04b254204e580565f Content-Type: text/plain; charset=ISO-8859-1 Thanks Nocolas and Suvayu, I will spend some time on ox-md.el and the section listed by Nicolas. One last question: If I choose to extend the existing back-end, would I be able to put all the code into a external file and allow the user to load it through it emacs config file? I mean, I would like to add a support of Twitter Bootstrap trough the ox-html.el export engine. If the user add "(require 'ox-html-bootstrap)" into its ".emacs" file, it will allow the user to extend the ox-html export engine. Does it seems possible? Thanks 2013/9/3 Nicolas Goaziou > Hello, > > Suvayu Ali writes: > > > On Tue, Sep 03, 2013 at 03:37:05PM +0200, flammable project wrote: > >> Hi all, > >> > >> I'm looking for informations on how to create a new exporter based on > the > >> new export engine. > >> > >> I want to convert org files into HTML files in which some "functions" > from > >> Twitter Bootstrap framework will be instantiated via Emacs and Org-Mode. > >> > >> I'm quite fustrated because the org-export_generic.el file is obsolete > and > >> I tried to use ox.el ox-ascii.el files but I was discouraged by their > heavy > >> contents. > >> > >> Could you please tell how to easily find a good starting "point" ? > > > > You could take a look at ox-md.el; it derives from ox-html.el. Since > > you want to add to ox-html.el, that might be a nice starting point. > > > > Needless to say, you should probably wait for Nicolas's comment. He is > > the expert, I'm just a user who looks at the source from time to time > > ;). > > The OP could also look at "12.13 Advanced configuration" from Org > manual. There's an example on how to extend an existing back-end. > > There's also `org-export-define-derived-backend' docstring. > > If the new exporter is not meant for public consumption and would always > be used instead of regular html back-end, defadvices are also fine. > > > Regards, > > -- > Nicolas Goaziou > > --001a11c241e04b254204e580565f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks Nocolas and=A0Suvayu,


I will spend some time o= n ox-md.el and the section listed by Nicolas.

One last question:
If I choose to exte= nd the existing back-end, would I be able to put all the code into a extern= al file and allow the user to load it through it emacs config file?=A0
I mean, I would lik= e to add a support of Twitter Bootstrap trough the ox-html.el export engine= . If the user add "(require 'ox-html-bootstrap)" into its &qu= ot;.emacs" file, it will allow the user to extend the ox-html export e= ngine.=
Does it = seems possible?

Thanks






2013/9/3 Nicolas Goaziou <n.goaziou@gmail.com>=
Hello,

Suvayu Ali <fatkasuvayu= +linux@gmail.com> writes:

> On Tue, Sep 03, 2013 at 03:37:05PM +0200, flammable project wrote:
>> Hi all,
>>
>> I'm looking for informations on how to create a new exporter b= ased on the
>> new export engine.
>>
>> I want to convert org files into HTML files in which some "fu= nctions" from
>> Twitter Bootstrap framework will be instantiated via Emacs and Org= -Mode.
>>
>> I'm quite fustrated because the org-export_generic.el file is = obsolete and
>> I tried to use ox.el ox-ascii.el files but I was discouraged by th= eir heavy
>> contents.
>>
>> Could you please tell how to easily find a good starting "poi= nt" ?
>
> You could take a look at ox-md.el; it derives from ox-html.el. =A0Sinc= e
> you want to add to ox-html.el, that might be a nice starting point. >
> Needless to say, you should probably wait for Nicolas's comment. = =A0He is
> the expert, I'm just a user who looks at the source from time to t= ime
> ;).

The OP could also look at "12.13 Advanced configuration&qu= ot; from Org
manual. There's an example on how to extend an existing back-end.

There's also `org-export-define-derived-backend' docstring.

If the new exporter is not meant for public consumption and would always be used instead of regular html back-end, defadvices are also fine.


Regards,

--
Nicolas Goaziou


--001a11c241e04b254204e580565f--