From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Summary: File-local export filters Date: Sun, 22 Sep 2013 00:16:59 +0200 Message-ID: References: <4D2D5EF0-F2CD-4B54-8562-488E43824596@gmail.com> <877gea2yau.fsf@gmail.com> <84C517A6-BFB9-486E-AF2C-9FDA255D66C4@gmail.com> <87y56q1gz8.fsf@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: multipart/signed; boundary="Apple-Mail=_2AA13383-BF41-4100-8DF0-9F4B6812AE98"; protocol="application/pgp-signature"; micalg=pgp-sha1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNVUB-0008Li-5P for emacs-orgmode@gnu.org; Sat, 21 Sep 2013 18:17:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VNVU2-0006a3-J8 for emacs-orgmode@gnu.org; Sat, 21 Sep 2013 18:17:07 -0400 Received: from mail-ea0-x236.google.com ([2a00:1450:4013:c01::236]:63413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNVU2-0006YR-B9 for emacs-orgmode@gnu.org; Sat, 21 Sep 2013 18:16:58 -0400 Received: by mail-ea0-f182.google.com with SMTP id o10so962052eaj.13 for ; Sat, 21 Sep 2013 15:16:57 -0700 (PDT) In-Reply-To: <87y56q1gz8.fsf@gmail.com> 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: Nicolas Goaziou Cc: emacs-orgmode mode --Apple-Mail=_2AA13383-BF41-4100-8DF0-9F4B6812AE98 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 21.9.2013, at 14:44, Nicolas Goaziou wrote: > Carsten Dominik writes: > >> OK, I'll try this. However, if the code is a bit more extensive, an >> SRC block would make it more comfortable to maintain this code inside >> a file. If I want to write a somewhat complex filter function, it is >> not convenient to do so in #+BIND line. > > I can't see why it would be inconvenient, since you needn't define the > filter within the BIND keyword. > > Anyway, you can write a source block that sets locally the filters. That > should work too. Indeed, this can be done. Here is an example (thanks also to Eric for quick help with the export arguments): * Special export setup :noexport: #+begin_src emacs-lisp :exports results :results none (defun my-org-export-filter-timestamp-function (timestamp backend info) "removes relevant brackets from a timestamp" (when (org-export-derived-backend-p backend 'html) (replace-regexp-in-string "&[gl]t;\\|[][]" "" timestamp))) (make-local-variable 'org-export-filter-timestamp-functions) (add-to-list 'org-export-filter-timestamp-functions 'my-org-export-filter-timestamp-function) #+end_src - Carsten --Apple-Mail=_2AA13383-BF41-4100-8DF0-9F4B6812AE98 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJSPhrbAAoJEO+gg/nAZuwMUCYH/R2GkSYCviSQTb+WS4ptsRQS 8QFeoHIb7bkYgL9M+ypnufzVIdpS7SmFJc/7YUthnSq1Bd56Cl8WlDUNdKT/fVsN WTErzuRBr4Qv+CQW3PwKMet/wUOXetSgeXTvwscP6EKbqC7Pygmz5qK2j/NGxN8H elJ8TlEbcVjF75Bu5oUNjUGXoyPhOvm0puOllMKMlhkyiRwY20QnA3QRa8iK0r1S rXuYhjCypleUIhhnCFE5v/fHhPf9XASFQGtgBplEr9lAylJCQDjzdx+8hDaAfXZ6 faQFkt7vMjQts560yJCyFxVmWxI+VMhSiimJc42/Qbg2Jem8SKehzkHwTCWovj4= =Xn7a -----END PGP SIGNATURE----- --Apple-Mail=_2AA13383-BF41-4100-8DF0-9F4B6812AE98--