From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Harkins Subject: Problem writing my first export filter Date: Wed, 21 Aug 2013 09:55:30 +0800 Message-ID: <871u5nst7x.wl%jamshark70@dewdrop-world.net> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBxeJ-0000P7-7J for emacs-orgmode@gnu.org; Tue, 20 Aug 2013 21:55:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBxeD-0004MN-7j for emacs-orgmode@gnu.org; Tue, 20 Aug 2013 21:55:51 -0400 Received: from mail-pa0-x22e.google.com ([2607:f8b0:400e:c03::22e]:37196) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBxeD-0004MB-1g for emacs-orgmode@gnu.org; Tue, 20 Aug 2013 21:55:45 -0400 Received: by mail-pa0-f46.google.com with SMTP id fa1so194352pad.33 for ; Tue, 20 Aug 2013 18:55:43 -0700 (PDT) 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: orgmode Referring to [1]: I just tried the following, so that I could maintain a list of special cases where org's default latex export doesn't do what I want. (setq hjh-org-latex-macros '(("`em" "'em"))) (defun hjh-latex-filter-macros (text backend info) "hjh: Replace special cases listed in hjh-org-latex-macros." (when (org-export-derived-backend-p backend 'latex) (dolist (element hjh-org-latex-macros) (replace-regexp-in-string (car element) (car (cdr element)) text)))) First I tried (setq org-export-filter-plain-text-functions '(hjh-latex-filter-macros)) -- no result: `em passes through unchanged. So then I tried clearing plain-text-functions and using final-output-functions instead. Same thing: the filter didn't do anything. I suppose I'm missing something simple. Thanks in advance for advice, hjh [1] http://article.gmane.org/gmane.emacs.orgmode/75607