From: Carsten Dominik <carsten.dominik@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: emacs-orgmode mode <emacs-orgmode@gnu.org>
Subject: Summary: File-local export filters
Date: Sun, 22 Sep 2013 00:16:59 +0200 [thread overview]
Message-ID: <C66E1CC2-5014-45B2-A67C-BF0E568A7824@gmail.com> (raw)
In-Reply-To: <87y56q1gz8.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1241 bytes --]
On 21.9.2013, at 14:44, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Carsten Dominik <carsten.dominik@gmail.com> 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
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2013-09-21 22:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-21 11:19 File-local export filters Carsten Dominik
2013-09-21 11:45 ` Nicolas Goaziou
2013-09-21 12:14 ` Carsten Dominik
2013-09-21 12:44 ` Nicolas Goaziou
2013-09-21 12:54 ` Carsten Dominik
2013-09-21 22:16 ` Carsten Dominik [this message]
2013-09-23 9:19 ` Rasmus
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C66E1CC2-5014-45B2-A67C-BF0E568A7824@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=n.goaziou@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.