From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: order of evaluation upon export: macros are evaluated too soon Date: Thu, 08 Jun 2017 14:36:38 +0200 Message-ID: <878tl2y7u1.fsf@nicolasgoaziou.fr> References: <874lvriyuv.fsf@delle7240.chemeng.ucl.ac.uk> <87poeen1ql.fsf@delle7240.chemeng.ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIwg8-0001uR-18 for emacs-orgmode@gnu.org; Thu, 08 Jun 2017 08:36:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIwg6-0001JE-IY for emacs-orgmode@gnu.org; Thu, 08 Jun 2017 08:36:44 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:35550) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dIwg6-0001Im-CI for emacs-orgmode@gnu.org; Thu, 08 Jun 2017 08:36:42 -0400 Received: from saiph.selenimh (00004301000000000000074b.ipv6.commingeshautdebit.fr [IPv6:2a03:a0a0:0:4301::74b]) (Authenticated sender: mail@nicolasgoaziou.fr) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 789C7A80E3 for ; Thu, 8 Jun 2017 14:36:39 +0200 (CEST) Received: from ngz by saiph.selenimh with local (Exim 4.89) (envelope-from ) id 1dIwg2-0006YP-Su for emacs-orgmode@gnu.org; Thu, 08 Jun 2017 14:36:38 +0200 In-Reply-To: <87poeen1ql.fsf@delle7240.chemeng.ucl.ac.uk> (Eric S. Fraga's message of "Thu, 08 Jun 2017 12:43: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" To: emacs-orgmode@gnu.org Hello, Eric S Fraga writes: > I do wonder, philosophically, about the use cases for macro expansion > and the resulting implementation. My understanding is that macros are > only for export so should they not pay attention to export exclusion > directives? Macros are expanded prior to Babel code evaluation=E2=80=94they can make ni= ce shortcuts for long Babel calls=E2=80=94so they have to obey to the same rul= es as Babel code evaluation, which ignores ":noexport:" directive. I do realize that macros, however, are expanded within commented trees; this is a mistake I am going to fix. Of course, if we accept to limit more macro expansion scope, we get more latitude in choosing the position of the expansion stage during the export process. I'm open to discussions about it, and more generally, about macros' features. Regards, --=20 Nicolas Goaziou