From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: using info in a filter Date: Wed, 30 Mar 2016 14:33:38 -0400 Message-ID: References: <878u103vz6.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alKw4-0001jr-QC for emacs-orgmode@gnu.org; Wed, 30 Mar 2016 14:33:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alKw0-00036n-L8 for emacs-orgmode@gnu.org; Wed, 30 Mar 2016 14:33:44 -0400 Received: from mail-qk0-x231.google.com ([2607:f8b0:400d:c09::231]:36720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alKw0-00036i-HA for emacs-orgmode@gnu.org; Wed, 30 Mar 2016 14:33:40 -0400 Received: by mail-qk0-x231.google.com with SMTP id i4so23341728qkc.3 for ; Wed, 30 Mar 2016 11:33:40 -0700 (PDT) In-reply-to: <878u103vz6.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: Org Mode Mailing List ok, thanks. Nicolas Goaziou writes: > Hello, > > John Kitchin writes: > >> How does one use the info in a filter? >> >> e.g. >> >> in (defun my-block-filter (data backend info)) >> >> data is the transcoded block string, and I want to add something to it >> based on say the type of block, name and header of the corresponding >> block. Is it possible to get to that from the info? Or is this a case >> where it is easier to make a custom backend with a function like: >> >> (defun sb-format (sb contents info)) that builds up the output string? > > Purpose for INFO in filters is to give access to export options. You > cannot have easily access to the element being exported. > > Another option is to use a parse tree filter, or as you suggest, > a custom back-end. > > Regards, -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu