From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: How to refer to parsed element in export-filter? Date: Sat, 11 Oct 2014 12:36:04 +0200 Message-ID: <877g0651wr.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xcu2f-0002MY-JY for emacs-orgmode@gnu.org; Sat, 11 Oct 2014 06:37:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xcu2Y-0001AJ-4v for emacs-orgmode@gnu.org; Sat, 11 Oct 2014 06:36:53 -0400 Received: from plane.gmane.org ([80.91.229.3]:46309) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xcu2X-0001AD-UD for emacs-orgmode@gnu.org; Sat, 11 Oct 2014 06:36:46 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xcu2J-0003In-Bo for emacs-orgmode@gnu.org; Sat, 11 Oct 2014 12:36:31 +0200 Received: from e178189059.adsl.alicedsl.de ([85.178.189.59]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 11 Oct 2014 12:36:31 +0200 Received: from tjolitz by e178189059.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 11 Oct 2014 12:36:31 +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 Hi List, in an exporter I would like to have a filter function (for headlines) that acts conditional on the back-end and on the headline's properties (say its :todo-keyword). But is it possible to find the internal representation of the filtered headline in the communication channel? #+BEGIN_SRC emacs-lisp (defun org-xyz-headline-filter (headline back-end info) "Filter transcoded output for headlines." (when (and (eq back-end 'xyz) (member (org-element-property :todo-keyword (FIND-CURR-HEADLINE (plist-get info :parse-tree))) (org-xyz-keywords)))...)) #+END_SRC I cannot figure out how to implement 'FIND-CURR-HEADLINE' in the stub above. Do I have to do the filtering directly in the transcoder function instead, or is there a way to make references to the element's parse-tree in a filter function? -- cheers, Thorsten