From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jay Dixit Subject: Re: Per-backend export options? Date: Wed, 19 Aug 2015 23:45:37 -0400 Message-ID: References: <20150706085806.GA19560@tuxteam.de> <87vbdx3a3e.fsf@gmx.us> <20150706141614.GA29079@tuxteam.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11425c52b6ae67051db5fdef Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSGnp-0004im-27 for emacs-orgmode@gnu.org; Wed, 19 Aug 2015 23:46:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZSGnn-0006BO-Tu for emacs-orgmode@gnu.org; Wed, 19 Aug 2015 23:46:08 -0400 Received: from mail-io0-x233.google.com ([2607:f8b0:4001:c06::233]:34329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSGnn-0006BF-MX for emacs-orgmode@gnu.org; Wed, 19 Aug 2015 23:46:07 -0400 Received: by iodb91 with SMTP id b91so32394338iod.1 for ; Wed, 19 Aug 2015 20:46:06 -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: tomas@tuxteam.de Cc: org-mode , Rasmus --001a11425c52b6ae67051db5fdef Content-Type: text/plain; charset=UTF-8 I do something similar to change export options between HTML and LaTeX: (defun my-org-export-change-options (plist backend) (cond ((equal backend 'html) (plist-put plist :with-toc nil) (plist-put plist :section-numbers nil)) ((equal backend 'latex) (plist-put plist :with-toc t) (plist-put plist :section-numbers t))) plist) (add-to-list 'org-export-filter-options-functions 'my-org-export-change-options) --- Jay Dixit jaydixit.com (646) 355-8001 Jay Dixit On Mon, Jul 6, 2015 at 10:16 AM, wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Mon, Jul 06, 2015 at 11:32:21AM +0200, Rasmus wrote: > [...] > > I'd use a macro for this. E.g. > > Works like a charm now :-) > > - -- t > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.12 (GNU/Linux) > > iEYEARECAAYFAlWaja4ACgkQBcgs9XrR2kaEzgCfbM0McF+Yi3sR1prWI8ix1cpu > pTIAn0PQumh5sUJmE4UBQm9OFd8Nc/CV > =z5tl > -----END PGP SIGNATURE----- > > > --001a11425c52b6ae67051db5fdef Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I do something similar to change export options betw= een HTML and LaTeX:

(defun my-org-export-change-options (plist backend)
=C2=A0 (cond
=C2=A0 =C2=A0((e= qual backend 'html)
=C2=A0 =C2=A0 (pl= ist-put plist :with-toc nil)
=C2=A0 =C2= =A0 (plist-put plist :section-numbers nil))
=C2=A0 =C2=A0((equal backend 'latex)
=C2=A0 =C2=A0 (plist-put plist :with-toc t)
=C2=A0 =C2=A0 (plist-put plist :section-numbers t)))
=C2=A0 plist)
(add-to-= list 'org-export-filter-options-functions 'my-org-export-change-opt= ions)



= ---
Jay Dixit=C2=A0
(646) 355-8001
=
Jay Dixit


On Mon, Jul 6, 2015 at 10:16 AM,=C2=A0<tomas@tuxteam.de>= =C2=A0wrote:
-----BEGIN PGP SIGNED MESSAGE-= ----
Hash: SHA1

On Mon, Jul 06, 2015 at 11:32:21AM +0200, Rasmus wrote:
[...]
> I'd use a macro for this.=C2=A0 E.g.

Works like a charm now :-)

- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlWaja4ACgkQBcgs9XrR2kaEzgCfbM0McF+Yi3sR1prWI8ix1cpu
pTIAn0PQumh5sUJmE4UBQm9OFd8Nc/CV
=3Dz5tl
-----END PGP SIGNATURE-----



--001a11425c52b6ae67051db5fdef--