From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: Export to LaTeX and Beamer Date: Wed, 17 Jul 2013 23:00:17 +0200 Message-ID: <20130717210017.GC11360@kuru.dyndns-at-home.com> References: <87ppuowz8m.fsf@free.fr> <20130713202518.GE11006@kuru.dyndns-at-home.com> <87txjwi3q3.fsf@free.fr> <20130715094034.GA27914@kuru.dyndns-at-home.com> <20130715094942.GB27914@kuru.dyndns-at-home.com> <87k3koc3sf.fsf@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38099) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzYpl-0004w9-Bd for emacs-orgmode@gnu.org; Wed, 17 Jul 2013 17:00:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzYpj-0007zV-Nn for emacs-orgmode@gnu.org; Wed, 17 Jul 2013 17:00:25 -0400 Received: from mail-we0-x229.google.com ([2a00:1450:400c:c03::229]:57883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzYpj-0007zD-Gk for emacs-orgmode@gnu.org; Wed, 17 Jul 2013 17:00:23 -0400 Received: by mail-we0-f169.google.com with SMTP id n57so2269320wev.0 for ; Wed, 17 Jul 2013 14:00:22 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87k3koc3sf.fsf@free.fr> 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: Julien Cubizolles Cc: Emacs Org mode 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 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.