From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Berry Subject: Re: Filters not working Date: Fri, 9 Aug 2013 20:52:12 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7tfp-0000Hq-2G for emacs-orgmode@gnu.org; Fri, 09 Aug 2013 16:52:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7tfj-00038L-3C for emacs-orgmode@gnu.org; Fri, 09 Aug 2013 16:52:37 -0400 Received: from plane.gmane.org ([80.91.229.3]:47088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7tfi-000387-T7 for emacs-orgmode@gnu.org; Fri, 09 Aug 2013 16:52:31 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V7tfg-0002zk-R7 for emacs-orgmode@gnu.org; Fri, 09 Aug 2013 22:52:29 +0200 Received: from 128.54.14.135 ([128.54.14.135]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 09 Aug 2013 22:52:28 +0200 Received: from ccberry by 128.54.14.135 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 09 Aug 2013 22:52:28 +0200 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: emacs-orgmode@gnu.org Thomas S. Dye tsdye.com> writes: > > Charles Berry 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,