emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Buffer-specific export filter?


From: Eric Abrahamsen
Subject: Re: [O] Buffer-specific export filter?
Date: Tue, 20 Aug 2013 21:56:49 +0800
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux)

Suvayu Ali <address@hidden> writes:

> 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,

Two related thoughts I've had: 1) at some point it might be nice to
allow customization of the export options at the top of the export menu
(what currently allows for Body only/Visible only/etc), so that you
could add hooks or perhaps filters on a per-export basis. Also 2), it
could be nice to show, in the export dispatcher, which export hooks are
currently active. Filters, too, if that didn't turn out to be too much
real estate...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]