emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to easily create a new export engine...


From: Eric Abrahamsen
Subject: Re: [O] How to easily create a new export engine...
Date: Wed, 04 Sep 2013 19:37:17 +0800
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux)

flammable project <address@hidden> writes:

> 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?

The trick here is that your file calls (require 'ox-html) at the top
(maybe requiring org itself is a good idea), and (provide 'ox-bootstrap)
at the bottom.

When writing your mode, you've required ox-html at the top, so in the
rest of the file you can override or build on the ox-html functions, and
at the bottom you provide users with everything you've done. When users
require your module, they will then require everything you've required,
thus loading the whole chain of dependencies that are necessary for your
module. They can go from zero to having all of org mode loaded, simply
by requiring your file. Provided you've required all the necessary
modules, of course!

E




reply via email to

[Prev in Thread] Current Thread [Next in Thread]