From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: [BUG] htmlp and latexp Date: Wed, 16 Feb 2011 17:11:36 +0000 Message-ID: References: <4D5B8E60.4070307@christianmoe.com> <871v38s1gw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=54302 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ppkuo-0001jf-Kw for emacs-orgmode@gnu.org; Wed, 16 Feb 2011 12:11:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ppkun-0008RX-7Z for emacs-orgmode@gnu.org; Wed, 16 Feb 2011 12:11:46 -0500 Received: from mail-ey0-f169.google.com ([209.85.215.169]:50821) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ppkum-0008Qz-Tn for emacs-orgmode@gnu.org; Wed, 16 Feb 2011 12:11:45 -0500 Received: by eyh6 with SMTP id 6so872006eyh.0 for ; Wed, 16 Feb 2011 09:11:44 -0800 (PST) In-Reply-To: <871v38s1gw.fsf@gnu.org> (Bastien's message of "Wed, 16 Feb 2011 11:44:31 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: Org , mail@christianmoe.com Bastien writes: > Hi Dan, > > Dan Davison writes: > >> I was about to make a temporary fix but I see Bastien's just fixed >> it. Bastien -- should we give that `backend' variable a name within the >> org-* namespace (and maybe defvar it in org.el?) so that it is a more >> respectable way to test for "am I doing export now?"? (This issue just >> came up in a separate babel thread). > > backend is dynamically scoped, so I think there is no need to defvar it > in org.el -- only in org-*-blocks.el, to avoid compilation warnings. > > Let me know if you think otherwise. Hi Bastien, I was thinking that if it were defvard in org.el, say as (defvar org-export-current-backend nil) then any code could use (null org-export-current-backend) to test whether org is currently exporting or not. Otherwise, the code has to be certain that it has been called during export if it is going to access the variable. For example, babel code can get called both during interactive evaluation with C-c C-c, and also during export. It might be helpful for that code to be able to inspect the value of org-export-current-backend to see what the current context is. Dan > > But it's a good idea to rename it to org-export-backend. Can you do it?