From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: Buffer-specific export filter? Date: Tue, 20 Aug 2013 15:02:02 +0200 Message-ID: <20130820130202.GC19436@kuru.dyndns-at-home.com> References: <8738q4si0o.wl%jamshark70@dewdrop-world.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBlZe-00010k-JG for emacs-orgmode@gnu.org; Tue, 20 Aug 2013 09:02:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBlZY-0002zL-GH for emacs-orgmode@gnu.org; Tue, 20 Aug 2013 09:02:14 -0400 Received: from mail-ee0-x22d.google.com ([2a00:1450:4013:c00::22d]:64927) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBlZY-0002yU-As for emacs-orgmode@gnu.org; Tue, 20 Aug 2013 09:02:08 -0400 Received: by mail-ee0-f45.google.com with SMTP id c50so192657eek.32 for ; Tue, 20 Aug 2013 06:02:06 -0700 (PDT) Content-Disposition: inline In-Reply-To: <8738q4si0o.wl%jamshark70@dewdrop-world.net> 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: emacs-orgmode@gnu.org On Tue, Aug 20, 2013 at 07:45:11PM +0800, James Harkins wrote: > Is it possible to apply a specific filter during export for one org document, but not others? > > Basically, a buffer-specific export filter. > > It appears in the org manual that the hook needs to be added into e.g. org-export-filter-plain-text-functions, where it remains globally for the duration of the session. But I have a case here where I need a filter to work around a specific problem I'm having in one document, which isn't a problem in other documents, and I don't want the filter to interfere with the other documents. > > Possible? I don't see any mention of it in the manual. Some thoughts: 1. Is it possible to set filters as buffer local? Okay the help string says: "This variable may be risky if used as a file-local variable.", so I guess the answer is no. 2. Otherwise you could have used a lisp source block in the buffer. You could still do that, just add a conditional that checks for the buffer name. This way modifying a global filter would still affect current buffer export. Hope this helps, -- Suvayu Open source is the future. It sets us free.