emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Charles Berry <ccberry@ucsd.edu>
To: emacs-orgmode@gnu.org
Subject: Re: Filters not working
Date: Fri, 9 Aug 2013 18:29:47 +0000 (UTC)	[thread overview]
Message-ID: <loom.20130809T202257-110@post.gmane.org> (raw)
In-Reply-To: m1zjsq7ol2.fsf@tsdye.com

Thomas S. Dye <tsd <at> tsdye.com> writes:

> 
> Aloha all,
> 
> After an upgrade from 8.0.3 this morning I'm unable to export a large
> writing project that has kept me from reading the ML regularly for the
> last few months. It seems that filters that used to work, no longer do
> so. For example,
> 
>   #+name: tsd-parencites
>   #+BEGIN_SRC emacs-lisp 
>   (defun tsd-latex-filter-parencites (text backend info)
>     "Replace parencites placeholders in Beamer/LaTeX export."
>     (when (memq backend '(beamer latex))
>       (replace-regexp-in-string "π" "\\parencites" text nil t)))
>   (add-to-list 'org-export-filter-plain-text-functions
>                'tsd-latex-filter-parencites)
>   #+END_SRC
> 
> now lets pi slip through into the LaTeX output, giving this error:
> 
> ERROR: Package inputenc Error: Unicode char \u8:π not set up for use with
LaTeX.
> 
> My question, is whether this filter is obviously broken given recent
> changes to Org-mode?  Any pointers greatly appreciated.
> 

Did you upgrade as in 'git pull'? If not, I cannot help.

If so,

This bit of org-mode:

,----
| * headline
| 
| 
| #+BEGIN_SRC emacs-lisp :eval yes :exports both
|   (defun test-filter-final (text back-end info)
|     "What is back-end?"
|     (concat "type-of back-end: " 
|             (format "%S" (type-of back-end))
|             "\nname of back-end: "
|             (symbol-name (org-export-backend-name back-end))))
|   
|   (add-to-list 'org-export-filter-final-output-functions 'test-filter-final)
| #+END_SRC
`----

will export via 

    C-c C-e l L y

as 

,----
| type-of back-end: vector
| name of back-end: latex
`----

Take a look at "(defstruct (org-export-backend..." in ox.el


HTH,

  reply	other threads:[~2013-08-09 18:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-09 17:37 Filters not working Thomas S. Dye
2013-08-09 18:29 ` Charles Berry [this message]
2013-08-09 19:39   ` Thomas S. Dye
2013-08-09 20:30     ` Aaron Ecay
2013-08-09 21:16       ` Thomas S. Dye
2013-08-09 20:52     ` Charles Berry
2013-08-09 21:18       ` Thomas S. Dye
2013-08-10  7:46         ` Nicolas Goaziou
2013-08-10 16:34           ` Thomas S. Dye

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20130809T202257-110@post.gmane.org \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).