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

Reply via email to