emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Rasmus <rasmus@gmx.us>
Cc: emacs-orgmode@gnu.org
Subject: Re: [ox-html] Multiple wraps around sections
Date: Sun, 16 Mar 2014 15:21:25 +0100	[thread overview]
Message-ID: <87ioreql5m.fsf@gmail.com> (raw)
In-Reply-To: <87a9cq5jio.fsf@gmx.us> (rasmus@gmx.us's message of "Sun, 16 Mar 2014 15:02:23 +0100")

Rasmus <rasmus@gmx.us> writes:

> With a filter the endpoint isn't a problem.  Only identifying the
> top-level can be tricky—but you could use <h·> tags, assuming they are
> not varying.

You can also use a hook function that will mark first level headlines
with some special string before export. Within the filter, you will
recognize that string and remove it.

> That a shame.  Is there any other 'easy' way to recover the element
> representation of, say, a headline?  Often it's a lot easier to work
> with than regexp "hacks".

Well, the whole point of filters is to be able to work from a string
instead of the full parse tree.

For the latter, you can use a parse tree filter that will alter the tree
in any way you like. For that task, some useful functions are
`org-element-extract-element', `org-element-insert-before' and
`org-element-adopt-elements'.


Regards,

-- 
Nicolas Goaziou

      reply	other threads:[~2014-03-16 14:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-15 23:32 [ox-html] Multiple wraps around sections Rasmus
2014-03-16 10:01 ` Nicolas Goaziou
     [not found] ` <m2wqfuy2yf.fsf@uio.no>
2014-03-16 13:01   ` Rasmus
2014-03-16 13:23     ` Nicolas Goaziou
2014-03-16 14:02       ` Rasmus
2014-03-16 14:21         ` Nicolas Goaziou [this message]

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=87ioreql5m.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=rasmus@gmx.us \
    /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).