On Wed, Jul 17, 2013 at 10:47:12PM +0200, Julien Cubizolles wrote: > Hi Ali (am I right in assuming that's your first nameĀ ?) > > Suvayu Ali <fatkasuvayu+li...@gmail.com> writes: > > > Here is an older version of the function: > > > > (defun my-org-export-remove-tagged-headlines (tag) > > (save-excursion > > (goto-char (point-min)) > > (while (re-search-forward (concat ":" tag ":") nil t) > > (delete-region (point-at-bol) (point-at-eol))))) > > > > Here I'm parsing the buffer in a pre-process hook. In a filter, you > > have to parse a string instead. But the logic should be the same. > > I'll try and adapt to make it work. I'll let you know how it goes.
Actually Rasmus shared his filter earlier today on the Emacs list. Try this: (defun my-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 'my-ignore-headline) Cheers, -- Suvayu Open source is the future. It sets us free.