emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ezequiel Birman <stormwatch@espiga4.com.ar>
To: emacs-orgmode@gnu.org
Subject: Re: new exporter, conditional options according to backend
Date: Sun, 20 Jan 2013 01:38:43 -0300	[thread overview]
Message-ID: <87fw1w8o4s.fsf@david.espiga4.com.ar> (raw)
In-Reply-To: <87sj5w23ia.fsf@gmail.com>

>>>>> "Nicolas" == Nicolas Goaziou <n.goaziou@gmail.com> writes:

    > Hello, Ezequiel Birman <stormwatch@espiga4.com.ar> writes:

    >> Is it possible to write something like this with the new
    >> exporter?
    >> #+OPTIONS: (if (and (boundp 'org-export-current-backend) (eq
    >> org-export-current-backend 'e-beamer)) "H:1" "H:3")

    > There is no `org-export-current-backend' in the new
    > exporter. Besides, what you want is the default behaviour (see
    > `org-e-beamer-frame-level' variable).

    >> From what I read in org-export.el the backend is stored in a
    >> plist, not sure how to get it's value when exporting.
    >> Or, maybe I need to write a filter function to be run from
    >> org-export-before-process-hook?

    > Filters are different from hook. A function in a hook operates on
    > an Org buffer. A filter function operates either on a string in
    > output syntax or on the parse tree.

    > If, for some reason, you want to modify export options "on the
    > fly", you could create a filter function for parse tree, and
    > modify options plist from it:

    > #+begin_src emacs-lisp (defun my-options-change-fun (tree backend
    > info) (when (org-export-derived-backend-p backend 'e-beamer)
    > (plist-put info :with-author nil)) ;; Don't forget to return tree.
    > tree)

    > (add-to-list 'org-export-filter-parse-tree-functions
    > 'my-options-change-fun) #+end_src

    > Regards,

    > -- Nicolas Goaziou

Thanks for the example and the clarificatons re filters versus hooks,
and for thinking of those sane defaults ahead too.

Ezequiel Birman

  reply	other threads:[~2013-01-20  4:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-18 15:47 Ezequiel Birman
2013-01-19 22:48 ` Nicolas Goaziou
2013-01-20  4:38   ` Ezequiel Birman [this message]
2013-01-20  5:35   ` Jambunathan K
2013-01-20  9:28     ` Nicolas Goaziou
2013-01-20 16:22       ` Jambunathan K
2013-01-28  7:12         ` Nicolas Goaziou
2013-01-24 20:32   ` Andreas Leha
2013-01-25 13:23     ` Nicolas Goaziou
2013-01-25 17:37   ` cberry
2013-01-25 17:50     ` Nicolas Goaziou

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:

  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=87fw1w8o4s.fsf@david.espiga4.com.ar \
    --to=stormwatch@espiga4.com.ar \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: new exporter, conditional options according to backend' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:


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).