emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: syntax for blocks that the exporter should not render?
Date: Tue, 3 Sep 2013 11:32:33 -0400	[thread overview]
Message-ID: <CAN_Dec-XjYbef3HvUA5UGjYwaR+PARtumJ3j55W1MSJTngZzuQ@mail.gmail.com> (raw)

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	other threads:[~2013-09-03 15:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03 15:32 Matt Price [this message]
2013-09-03 15:59 ` syntax for blocks that the exporter should not render? Jambunathan K
2013-09-05 12:09   ` Carsten Dominik
2013-09-04 17:40 ` Suvayu Ali
2013-09-05  3:34 ` Carsten Dominik
2013-09-05 10:09   ` Nicolas Goaziou
2013-09-05 11:27     ` Carsten Dominik
2013-09-05 11:43       ` Suvayu Ali
2013-09-05 11:57         ` Carsten Dominik
2013-09-05 14:51           ` Matt Price
2013-09-05 14:40     ` Matt Price

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=CAN_Dec-XjYbef3HvUA5UGjYwaR+PARtumJ3j55W1MSJTngZzuQ@mail.gmail.com \
    --to=moptop99@gmail.com \
    --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).