emacs-orgmode
[Top][All Lists]
Advanced

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

[O] syntax for blocks that the exporter should not render?


From: Matt Price
Subject: [O] syntax for blocks that the exporter should not render?
Date: Tue, 3 Sep 2013 11:32:33 -0400

Hi,

certain lines are not rendered by the org exporter, but are instead
interpreted as instructions, e.g.:

#+AUTHOR: Matt Price

I'm using org2blog/wp, which is only partially converted to the new
exporter.  It works pretty well, but not perfectly.  It has the neat
feature that, when I insert a link to a local image, it will upload
that image to wordpress and link to the uploaded file.  TO keep track
of the location of those images, it writes lines like this to the org
file:

#+/home/matt/Matt_headshots/Matt Price/IMG_9367_.jpg
http://2013.hackinghistory.ca/wp-content/uploads/2013/08/wpid-IMG_9367_2.jpg

Recently I've noticed that these lines are actually being rendered by
the underlying html exporter before export.  I can (sort of) fix this
by adding a filter to the exporter (thanks again Nicolas!):

---------
(add-to-list 'org-export-filter-paragraph-functions
'matt-org-export-filter-paragraph-function)
(defun matt-org-export-filter-paragraph-function (paragraph backend info)
  "removes comments from export"
  (when (org-export-derived-backend-p backend 'html)
    (replace-regexp-in-string "^#\+.*$" "" paragraph)
))

but it would be better if I could get the underlying exporter to just
ignore these lines. I thought that the leading #+ was enough to get
org to treat these lines as non-text -- but I guess I'm wrong!  Anyone
know a solution?

Thanks!
Matt



reply via email to

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