From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: using info in a filter Date: Wed, 30 Mar 2016 16:02:05 +0200 Message-ID: <878u103vz6.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alGfB-00050q-6J for emacs-orgmode@gnu.org; Wed, 30 Mar 2016 10:00:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alGf7-00043O-5U for emacs-orgmode@gnu.org; Wed, 30 Mar 2016 10:00:01 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:33276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alGf6-00042z-Uq for emacs-orgmode@gnu.org; Wed, 30 Mar 2016 09:59:57 -0400 In-Reply-To: (John Kitchin's message of "Mon, 28 Mar 2016 11:16:56 -0400") 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: John Kitchin Cc: Org Mode Mailing List 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, -- Nicolas Goaziou