emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: Re: Buffer-specific export filter?
Date: Tue, 20 Aug 2013 21:56:49 +0800	[thread overview]
Message-ID: <87y57w5uu6.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 20130820130202.GC19436@kuru.dyndns-at-home.com

Suvayu Ali <fatkasuvayu+linux@gmail.com> 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	other threads:[~2013-08-20 13:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-20 11:45 Buffer-specific export filter? James Harkins
2013-08-20 13:02 ` Suvayu Ali
2013-08-20 13:56   ` Eric Abrahamsen [this message]
2013-08-21  1:27   ` James Harkins
2013-08-21  7:41     ` Nicolas Goaziou
2013-08-21  9:45       ` James Harkins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y57w5uu6.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).