From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: #+include: with ``adjustable'' path (separately defined, like macro expansion) Date: Sat, 14 Nov 2015 09:34:10 +0100 Message-ID: <87fv09569p.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxWG5-0006zA-1i for emacs-orgmode@gnu.org; Sat, 14 Nov 2015 03:32:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxWG1-0001ls-1n for emacs-orgmode@gnu.org; Sat, 14 Nov 2015 03:32:28 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:48086) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxWG0-0001la-SW for emacs-orgmode@gnu.org; Sat, 14 Nov 2015 03:32:24 -0500 In-Reply-To: (Martin Steffen's message of "Sat, 14 Nov 2015 07:31:51 +0000 (UTC)") 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: Martin Steffen Cc: emacs-orgmode@gnu.org Hello, Martin Steffen writes: > I'd like to achieve something like the following (which does not work) > > #+MACRO: custompath ~/some/place/where/the/code/resides > #+include: "{{{custompath}}}src/example.code" > > Macro-expansion generally works, but not in those circumstances. I think the manual is pretty clear about the locations where macros are expected to work. In this case, as you noticed, they won't. > Is there a way to achieve what I want, which I overlooked? You can expand such INCLUDE keyword using some markup of your own and a function within `org-export-before-processing-hook'. However, it will not work for nested INCLUDE keywords. Regards, -- Nicolas Goaziou