From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: BIND org-html-style-include-* Date: Fri, 15 Feb 2013 15:18:29 +0100 Message-ID: <87txpd64p6.fsf@gmail.com> References: <87mwv9ut5h.fsf@lapcat.tftorrey.com> <87r4kh7oc2.fsf@gmail.com> <874nhdfyxt.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6M7u-00079Z-68 for emacs-orgmode@gnu.org; Fri, 15 Feb 2013 09:19:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U6M7r-0001AG-LO for emacs-orgmode@gnu.org; Fri, 15 Feb 2013 09:18:58 -0500 Received: from mail-wi0-f179.google.com ([209.85.212.179]:34439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6M7r-0001A4-AV for emacs-orgmode@gnu.org; Fri, 15 Feb 2013 09:18:55 -0500 Received: by mail-wi0-f179.google.com with SMTP id ez12so1211073wid.12 for ; Fri, 15 Feb 2013 06:18:54 -0800 (PST) In-Reply-To: <874nhdfyxt.fsf@bzg.ath.cx> (Bastien's message of "Fri, 15 Feb 2013 15:12:46 +0100") 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: Bastien Cc: emacs-orgmode@gnu.org Bastien writes: > We need to make `org-html--build-mathjax-config' depends on whether > there is an latex-fragment element in the parse tree. Otherwise, > including the MathJAX config is useless. > > I've been looking at this this morning. > > Is there an org-element function to test whether an element/object > of a certain type is present in the parse tree? On course, it is `org-element-map' (you can have a look at its docstring, there is one such example). So, assuming you have access to communication channel (a.k.a. info argument): (org-element-map (plist-get info :parse-tree) '(latex-fragment latex-environment) 'identity info t) will be non-nil when either an exportable `latex-fragment' object or a `latex-environment' element is found within the parse tree. Regards, -- Nicolas Goaziou