From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Filtering in export hooks Date: Tue, 6 Sep 2011 10:58:13 +0200 Message-ID: <62F4E48A-A0B3-48B0-8180-471EE93F187A@gmail.com> References: Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:57013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0rU5-0000pv-LY for emacs-orgmode@gnu.org; Tue, 06 Sep 2011 04:58:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0rU1-00055K-Mk for emacs-orgmode@gnu.org; Tue, 06 Sep 2011 04:58:21 -0400 Received: from mail-ey0-f171.google.com ([209.85.215.171]:58881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0rU1-00055C-FP for emacs-orgmode@gnu.org; Tue, 06 Sep 2011 04:58:17 -0400 Received: by eyg24 with SMTP id 24so6258074eyg.30 for ; Tue, 06 Sep 2011 01:58:15 -0700 (PDT) In-Reply-To: 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: suvayu ali Cc: org-mode mailing list On Sep 6, 2011, at 10:49 AM, suvayu ali wrote: > Hi Orgers, > > What is the recommended way to filter/select headlines I want to > preprocess in any of the export hooks? I have tried using tags like > this: > > (let ((match "tag1|tag2")) > (org-map-entries (lambda () (my-preprocess-function)) > match)) > > But this only works when tags: is non-nil. Any hints on how I could > achieve something that "works always"? May be I do not understand, but how about (let ((match "tag1|tag2")) (when match (org-map-entries (lambda () (my-preprocess-function)) match))) - Carsten