From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: syntax for blocks that the exporter should not render? Date: Thu, 5 Sep 2013 05:34:36 +0200 Message-ID: References: Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHQL7-0004Ax-Nz for emacs-orgmode@gnu.org; Wed, 04 Sep 2013 23:34:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHQL1-0006bU-F8 for emacs-orgmode@gnu.org; Wed, 04 Sep 2013 23:34:37 -0400 Received: from mail-ee0-x22b.google.com ([2a00:1450:4013:c00::22b]:48035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHQL1-0006bO-7j for emacs-orgmode@gnu.org; Wed, 04 Sep 2013 23:34:31 -0400 Received: by mail-ee0-f43.google.com with SMTP id e52so590241eek.30 for ; Wed, 04 Sep 2013 20:34:30 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Matt Price Cc: Org Mode On 3.9.2013, at 17:32, Matt Price wrote: > Hi, >=20 > certain lines are not rendered by the org exporter, but are instead > interpreted as instructions, e.g.: >=20 > #+AUTHOR: Matt Price >=20 > 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: >=20 > #+/home/matt/Matt_headshots/Matt Price/IMG_9367_.jpg > = http://2013.hackinghistory.ca/wp-content/uploads/2013/08/wpid-IMG_9367_2.j= pg >=20 > Recently I've noticed that these lines are actually being rendered by > the underlying html exporter before export. I don't think this is the right behavior, such lines should not be = rendered. Suvayu is right, with a space after the # they are treated as commendt, = but I think they should also be ignored with the plus. Nicolas, what is the reasoning behind rendering them? Thanks - Carsten > I can (sort of) fix this > by adding a filter to the exporter (thanks again Nicolas!): >=20 > --------- > (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) > )) >=20 > 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? >=20 > Thanks! > Matt >=20