Nicolas Goaziou <n.goaz...@gmail.com> writes: > Hello, > > Eric S Fraga <e.fr...@ucl.ac.uk> writes: > >> This little snippet works just fine for comment lines. However, I tried >> changing the regexp to one that matches an :ignoreheading: tag on a >> headline. This works when I do a LaTeX export but not an HTML one. Why >> would the behaviour be different in each case? > > It shouldn't. Would you mind sending your hook?
Actually, it works so sorry about the noise. I just tried emacs -Q and realised that one of my other customisations was getting in the way. For the record, this is what I have which (almost) does what I want: #+begin_src emacs-lisp (defun esf/remove-lines-with-ignore-heading-tag (backend) (message "Deleting lines with ignore heading tag") (delete-matching-lines "^\\*+.*[ \t]+[a-ZA-Z0-9:]*:ignoreheading:[a-ZA-Z0-9:]*$")) (add-hook 'org-export-before-processing-hook 'esf/remove-lines-with-ignore-heading-tag) #+end_src I say almost because I actually want to replace matching lines by "\n" and not simply delete them (sort of going against the whole thread... ;-). But I'll figure this bit out -- good emacs lisp practice for me! thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.0.5-337-g9f3bed