From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: [new exporter] ignoring a headline on export to PDF via latex Date: Wed, 6 Mar 2013 09:00:42 +0000 Message-ID: <87ip54ykat.fsf@ucl.ac.uk> References: <87zjyh7vql.fsf@pinto.chemeng.ucl.ac.uk> <87r4jtsc4s.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDAt7-00068l-2R for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 04:43:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDAt5-0006RH-Qo for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 04:43:52 -0500 Received: from ch1ehsobe002.messaging.microsoft.com ([216.32.181.182]:46615 helo=ch1outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDAt5-0006QB-Lb for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 04:43:51 -0500 In-Reply-To: <87r4jtsc4s.fsf@gmail.com> (Nicolas Goaziou's message of "Tue, 5 Mar 2013 23:41:23 +0100") 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org Nicolas Goaziou writes: [...] > Indeed, this won't work anymore: `org-latex-translate-alist' has been > removed. The equivalent would just be to use a defadvice: > > #+begin_src emacs-lisp > (defadvice org-latex-headline (around my-latex-skip-headlines > (headline contents info) activate) > (if (member "ignoreheading" (org-element-property :tags headline)) > (setq ad-return-value contents) > ad-do-it)) > #+end_src > > Another approach is, as mentioned by Charles Berry, to remove the first > line of transcoded headline when it contains "ignoreheading". > > #+begin_src emacs-lisp > (defun org-latex-ignore-heading-filter-headline (headline backend info) > "Strip headline from HEADLINE. Ignore BACKEND and INFO." > (when (and (org-export-derived-backend-p backend 'latex) > (string-match "\\`.*ignoreheading.*\n" headline)) > (replace-match "" nil nil headline))) > (add-to-list 'org-export-filter-headline-functions > 'org-latex-ignore-heading-filter-headline) > #+end_src Nicolas, this is exactly what I was looking for. It works perfectly. Many thanks! eric -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_7.9.3f-1199-g3a0e55