From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Subject: Re: Restrict include to some backend Date: Wed, 14 Sep 2016 08:21:36 -0400 Message-ID: References: <87mvjluiin.fsf@saiph.selenimh> <1c034d43-221c-2f48-8693-9fbf7b5cb727@gmail.com> <87oa40rcpt.fsf@saiph.selenimh> <475d2764-542a-6bb0-bc3a-ff7fd7294097@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1el10WQslBt3kBoCPh8xh93cmQSmPN2v8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bk9CY-0005rS-JW for emacs-orgmode@gnu.org; Wed, 14 Sep 2016 08:22:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bk9CT-0008Gl-J4 for emacs-orgmode@gnu.org; Wed, 14 Sep 2016 08:22:05 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:62278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bk9CT-00089W-9B for emacs-orgmode@gnu.org; Wed, 14 Sep 2016 08:22:01 -0400 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" To: Kaushal Modi Cc: emacs-orgmode@gnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1el10WQslBt3kBoCPh8xh93cmQSmPN2v8 Content-Type: multipart/mixed; boundary="pcTaQ9BT0BVjaMMIreVcXeh2kpkntwhKB"; protected-headers="v1" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: Kaushal Modi Cc: emacs-orgmode@gnu.org Message-ID: Subject: Re: [O] Restrict include to some backend References: <87mvjluiin.fsf@saiph.selenimh> <1c034d43-221c-2f48-8693-9fbf7b5cb727@gmail.com> <87oa40rcpt.fsf@saiph.selenimh> <475d2764-542a-6bb0-bc3a-ff7fd7294097@gmail.com> In-Reply-To: --pcTaQ9BT0BVjaMMIreVcXeh2kpkntwhKB Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016-09-14 07:55, Kaushal Modi wrote: > On Mon, Sep 12, 2016 at 11:14 PM Cl=C3=A9ment Pit--Claudel > wrote: >=20 > Sure thing :) Here it is: >=20 >=20 > Thanks! This works great! I added it to `org-export-before-processing-h= ook'. Glad to hear that :) > I did not understand why you mentioned: "I call this before calling `or= g-latex-export-to-latex'.". Back when I wrote this I was starting out with Org-mode, I was in a hurry= , and I didn't know about org-export-before-processing-hook :) So instead= I had a larger ELisp script that opened the file, ran this filter, then = called org-latex-export-to-latex :) > I plan to add a "not" condition to this. That way, with below: >=20 > #+BEGIN_ONLY tex > foo > #+END_ONLY tex =20 >=20 > #+BEGIN_EXCEPT tex > bar > #+END_EXCEPT tex =20 >=20 > foo will be exported only for tex, and for every other backend, bar wil= l be exported. >=20 > WDYT? Looks good. Maybe using the same syntax for both would be good though; so= mething like "BEGIN_ONLY tex" and "BEGIN_ONLY :not tex" maybe? We could probably get rid of the "tex" part after the END_ONLY, and chang= e "tex" to "latex" for consistency with BEGIN_EXPORT :) Cheers, Cl=C3=A9ment. --pcTaQ9BT0BVjaMMIreVcXeh2kpkntwhKB-- --1el10WQslBt3kBoCPh8xh93cmQSmPN2v8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX2UDQAAoJEPqg+cTm90wjblgP/0PqEaMEEUbx2a/jR03haGl6 mq4CgyyWNunxe+HWfiJ6b6re0AvaQU0L6YPO0+Vr0F3OiJH6wbPGp7oLKcZKDh3Y 99ne+LtBfuedL1tiGX9RQ2q9f6++LozOJdeprmMH5TZ9KQ+DUN2tF7u5jokxjyat q1IlOt8buo3saVY394GJQ4FJNrdDO3BRLK/a6MTl7aO9TcqR+bYDWK7FtoEqiJRn jcnFpeyZS967M9O8USLNt2LMkbTJeyoQ4YTXo9NjPXWkQOqUAxqVPpXSGt6BEH6r OmxlrSzRRXunZqLhoJkDpwFW7SmVbCXfWjoj9teIKsrHtSefNDAWhSqKdT5pOKYe A7CGsMloJHyjJKC8nBHmI1YU50LROOMM0zZdoa67+FCZciKfwl8n2frMdKfElLP7 QZEtnVHauPfR0U7Pf2mHX0Fm742bCy2SQPS7N1Kr1aibdYo+B4eNUFvXKyEk89xz rks+CK+JmrAS+H1tAm/4lV8unzGruiTPC76w66NsK4FzTyYs2vIANbR7c0AuqUF9 qJfrxw2XFqYOUWzDE1iZJOrm/jcou4jCZAejZN1D4eMkCNuZyQePIfZPERdHUEml Ar8D4uu1qh1uTE6ulIYCntRcuOsbuy3p3kYGTdtfDqVPxJK7O8vjbtwyhwaHAhAo tLWmX5QyM2iYsRp0y+rA =SCYf -----END PGP SIGNATURE----- --1el10WQslBt3kBoCPh8xh93cmQSmPN2v8--