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 20:52:12 +0000 (UTC)	[thread overview]
Message-ID: <loom.20130809T222301-180@post.gmane.org> (raw)
In-Reply-To: m1k3ju3b8c.fsf@poto.myhome.westell.com

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

> 
> Charles Berry <ccberry <at> ucsd.edu> writes:
> 

[filter to demo extracting back-end name deleted]

> >
> > ,----
> > | type-of back-end: vector
> > | name of back-end: latex
> > `----
> 
> Yes, it does.
> 
> >
> > Take a look at "(defstruct (org-export-backend..." in ox.el
> 
> OK, I had a look at org-export-backend, but not sure what I'm looking
> for in particular.  
> 
> I did note that you don't test back-end directly, but instead look at
> org-export-backend-name. Perhaps this is what Nicolas means by "Filters
> defined here shouldn't make a back-end test, as it may prevent back-ends
> derived from this one to behave properly"?

That comment was in the context of back-end specific filters and aimed at
back-end developers. You are adding to 
org-export-filter-plain-text-functions, which is for users. So, go ahead
and test.


> 
> However, changing my filter so it uses org-export-backend-name doesn't
> seem to change anything.
> 
> Or, was I supposed to learn something else from ox.el?
> 

The changes introduced in commit

  cea0434c4f7f7f1fc1547e6790b96a76bc217e15
  ox: Change back-ends internal representation to structures

necessitate extracting the name of the back-end from a vector.

So, this bit of code 

     (memq backend '(beamer latex)) 

will never return t, because backend is a vector.

Probably what you want is 

     (memq (org-export-backend-name backend) '(latex beamer))


HTH,

  parent reply	other threads:[~2013-08-09 20:52 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
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 [this message]
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.20130809T222301-180@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).