From: Rick Frankel <rick@rickster.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: New html exporter and filters
Date: Tue, 5 Mar 2013 18:05:05 -0500 [thread overview]
Message-ID: <20130305230504.GA6181@BigDog.local> (raw)
In-Reply-To: <87y5e2tg6n.fsf@gmail.com>
On Tue, Mar 05, 2013 at 09:16:16AM +0100, Nicolas Goaziou wrote:
> Rick Frankel <rick@rickster.com> writes:
> > On the other hand, it would be easier if ox-html were modified so that
> > org-html-headline uses a variable (or callback) for the format of the
> > wrapper (currently "<div id=\"%s...") and a callback for the div id
> > generation. This would add flexibility for inherited backends as well
> > as allow for more "html5ish" structures (e.g., <section> and <article>
> > instead of generic <divs>).
>
> Wouldn't it be simpler to just fork `org-html-headline' in your back-end
> in order to replace the divs with something you need?
Well, `org-html-headline' does a lot and I'm trying to rewrite as
little as possible. Actually, i already wrap `org-html-headline', so i
could fix the :CUSTOM_ID on the way in. I think i was looking for a
solution to both the wrapper element and id in the same place (a
filter).
> On the other hand, there are a couple of variables providing a way to
> modify divs ids in ox-html.el. I suppose one more doesn't hurt. It may
> be even better to collect them in a single defcustom.
>
> What do you think?
What I think is missing is a way to customize the element used for the
wrapper, and possiblly the id/class prefixes. The simple solution
would be to add an `org-headline-wrapper-element' customization
(defaulting to "div"), or if allowing change to the id and class:
'("div" "outline-container-%s" "outline-%d").
If you were to over-engineer it,something along the lines of the way
the latex exporter specifies the headline hierarchies for one of the
document classes would work :}
Likewise, it would make sense for the `org-html-divs' to become a list
of '(element . class) instead of a list of just classes. e.e.g
(defcustom org-html-divs '(("header" . "preamble")
("section" . "content")
("footer" . "postamble"))
Rick
next prev parent reply other threads:[~2013-03-05 23:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 20:58 New html exporter and filters Rick Frankel
2013-03-05 8:16 ` Nicolas Goaziou
2013-03-05 23:05 ` Rick Frankel [this message]
2013-03-06 11:37 ` Jambunathan K
2013-03-06 19:45 ` Jambunathan K
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=20130305230504.GA6181@BigDog.local \
--to=rick@rickster.com \
--cc=emacs-orgmode@gnu.org \
--cc=n.goaziou@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).