From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: getting item information in an export filter? Date: Mon, 03 Feb 2020 17:05:07 +0100 Message-ID: <87mu9z8xn0.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:40726) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyeDz-0000Kv-B7 for emacs-orgmode@gnu.org; Mon, 03 Feb 2020 11:05:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyeDx-0003nJ-Jl for emacs-orgmode@gnu.org; Mon, 03 Feb 2020 11:05:22 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:55053) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iyeDx-0003Ze-Bq for emacs-orgmode@gnu.org; Mon, 03 Feb 2020 11:05:21 -0500 In-Reply-To: (John Kitchin's message of "Mon, 3 Feb 2020 09:15:43 -0500") 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: John Kitchin Cc: org-mode-email Hello, John Kitchin writes: > In > https://emacs.stackexchange.com/questions/55231/org-mode-export-html-add-name-attirbute-to-checkbox-input > > there was a question about modifying a checkbox export. I wrote an answer > using a custom translate function in a derived backend, where I could get > the name of the parent list pretty easily. > > It seems like that should also be possible in a filter, but I don't > understand how to find the parent list in that case. I think it is buried > in the info. > > Is there a general way to get to the org-element information for something > in an export filter function? No, there's no simple way to access the element. Filters, with a few exceptions, are meant to operate on strings, not on the parse tree. They are usual meant as a simple way to transform the output. I.e., they are intentionally dumbed down. You could however, use the parse-tree filter to modify the parse tree before export. Regards, -- Nicolas Goaziou