From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: a post-processing export hook?
Date: Tue, 01 Dec 2015 19:50:49 -0500 [thread overview]
Message-ID: <m2bna9ad1y.fsf@andrew.cmu.edu> (raw)
Hi all,
I tried using org-export-before-parsing-hook to modify an org-file prior
to export to replace some regular expressions with html.
I ran into the following issue. For short substitutions,
@@html:replacement@@ worked fine. If the replacement text got too long,
this broke. I did wrap it in a #+begin_html: block, but that introduced
line breaks that were undesireable. The replacement text was long
because I had a large tool tip to put on some text.
I ended up doing a post-process like this:
(with-current-buffer (org-html-export-as-html)
(org-process-key-bindings 'html)
(org-process-emacs-commands 'html)
(write-file "blog.html")
(browse-url "blog.html"))
But, I wondered if there should be a post-export hook? I can see some
challenge for pdf export, for example. The hook should run after the
latex export, not after the pdf is made.
I could have used a filter on a paragraph, which is where most of the
things I was modifying were. Is there some other way I could have done
this?
--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
next reply other threads:[~2015-12-02 0:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-02 0:50 John Kitchin [this message]
2015-12-02 10:05 ` a post-processing export hook? Rasmus
2015-12-02 11:04 ` John Kitchin
2015-12-02 11:33 ` Rasmus
2015-12-17 17:39 ` Grant Rettke
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=m2bna9ad1y.fsf@andrew.cmu.edu \
--to=jkitchin@andrew.cmu.edu \
--cc=emacs-orgmode@gnu.org \
/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).