From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Harkins Subject: "ignoreheading" for non-beamer export Date: Thu, 25 Jul 2013 17:42:00 -0400 Message-ID: <87mwpa2u6v.wl%jamshark70@dewdrop-world.net> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2TIW-0003pb-3e for emacs-orgmode@gnu.org; Thu, 25 Jul 2013 17:42:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2TIU-0006yb-W5 for emacs-orgmode@gnu.org; Thu, 25 Jul 2013 17:42:08 -0400 Received: from mail-qc0-x233.google.com ([2607:f8b0:400d:c01::233]:43594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2TIU-0006yS-Rh for emacs-orgmode@gnu.org; Thu, 25 Jul 2013 17:42:06 -0400 Received: by mail-qc0-f179.google.com with SMTP id d1so1234021qcz.10 for ; Thu, 25 Jul 2013 14:42:06 -0700 (PDT) Received: from dlm-A6200.gmail.com (cpe-98-157-146-44.ma.res.rr.com. [98.157.146.44]) by mx.google.com with ESMTPSA id nh4sm1023811qeb.6.2013.07.25.14.42.05 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 25 Jul 2013 14:42:05 -0700 (PDT) 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: orgmode Hi, I found an inventive solution by Suvayu to discard headlines from export here [1], but the 8.0+ solution throws an error in my environment. (defun sa-ignore-headline (contents backend info) "Ignore headlines with tag `ignoreheading'." (when (and (org-export-derived-backend-p backend 'latex 'html 'ascii) (string-match "\\`.*ignoreheading.*\n" (downcase headline))) (replace-match "" nil nil headline))) (add-to-list 'org-export-filter-headline-functions 'sa-ignore-headline) --> string-match: Symbol's value as variable is void: headline It seems it should actually be: (defun sa-ignore-headline (contents backend info) "Ignore headlines with tag `ignoreheading'." (when (and (org-export-derived-backend-p backend 'latex 'html 'ascii) (string-match "\\`.*ignoreheading.*\n" (downcase contents))) (replace-match "" nil nil contents))) (add-to-list 'org-export-filter-headline-functions 'sa-ignore-headline) I'm not allowed to reply to the answer on stackexchange, so I'm posting here. Thanks. hjh [1] http://stackoverflow.com/questions/10295177/is-there-an-equivalent-of-org-modes-b-ignoreheading-for-non-beamer-documents