From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MMnML0lK7WPmcgEAbAwnHQ (envelope-from ) for ; Wed, 15 Feb 2023 22:10:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id uLk6MElK7WMXnAAAauVa8A (envelope-from ) for ; Wed, 15 Feb 2023 22:10:33 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8743F2AA01 for ; Wed, 15 Feb 2023 22:10:33 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=leHoEsnL; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676495433; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=bKGaxsrmtCa8JYg9nMpmOcciKVBfoJWZoli+0KXfoKQ=; b=GJZfiQqEbrA/XTbF5PBqCAOtr9IFt14jNyBGJVA+4r/gONBowkReVgx0SsXuMaP4Le597X pVNK5nvzEJcmf1ac19Hw5BF3FCbEDfKFvqpFvr7I6k9hGS4bQ7n/zosOzZMoZ49eWGFRJ+ eiHDxteeLgdcsIy7hVF+h9Gdk+s0zXlY8UtpMiCWV9lRNd53WAO1XyHNza7fIonpnUL6YM cAxLDOB/7sXoscc9Sdi08rVhpbxSuby9RWafOlmFZgoO3pdRj1RwLueFnp/OvHwLvbiLyI MY6jdBYOUT661z8smaOo+9WHxCnCeLbUYeY8EezJ5D9R0yuagzmbrV7nzgRtew== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=leHoEsnL; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676495433; a=rsa-sha256; cv=none; b=KSovgeYO4VcSmvZiHpbNq5yL4auM9o3PCEvEjVnxrJplbMmvvSue+uLW5GUGj7V+fsFBy8 hLARh4dWD8qydNoFN0tHKEHOVREcVafabs2jNa1FYDylhtqA5bQL75MMwFoDRIQJTYOEld 83wXul+3ak+VvBSy5hxsffuZ055vmzJvY9pjsrwn0yUyR3UKYIy8GOwMosN3tYVoVgva5c AJZS7rkPUPBXco9bBztZDEmFfrcGKhN34MaU5ZMZ5u4xstlwG0HErRGPRQyaLtVCT746XG MsbW03dnJG1Soy6QdqCKLwXcgleXIWjKTBGuK0+01iY6X5NEI1H3ZFZw6Lu/2A== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSP2K-0003Cj-7y; Wed, 15 Feb 2023 16:09:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSP2J-0003CL-8V for emacs-orgmode@gnu.org; Wed, 15 Feb 2023 16:09:55 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSP2H-0006xa-MT for emacs-orgmode@gnu.org; Wed, 15 Feb 2023 16:09:54 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 31CBD240301 for ; Wed, 15 Feb 2023 22:09:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1676495392; bh=H4lY9K9TL/2kGjFcfO42VA8R7OiyJ+Ax1O/gFYz44HY=; h=From:To:Cc:Subject:Date:From; b=leHoEsnLv+uy6icmFkDErmws4pNvLl2GHJvhnng31TKHbr+7tk6gFjBn5cPpsQBQk 6x4gRO+WPAgLgnwb0SKPIWeHglHhd3mfxPuDALUAI690gGwviQxq9l5bx7VXWUF3fG x/Vqw2aZ2NnvjgawKjjKpoHaYVW3D0CC5ER/EY089u7drHH5nqMAOh4xV/9Fkp10sK DUZR99QUSaVfxosgCaGyRIDvNz9OdmQ4bRJf6GGGvHR7QU0OVW7IyX0jf/e4JiIdKE PYR0+PCv2Et2rSZdUwYxVpSA7MoKQ91SvMzaZx/afydZNJ8BDBQtLRB6TC/S2ZnY6f 7+/COd5Ygh4cQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PH9gz3vzdz6tmV; Wed, 15 Feb 2023 22:09:51 +0100 (CET) From: Ihor Radchenko To: reza Cc: "emacs-orgmode@gnu.org" Subject: Re: Cannot expand macros through included org file In-Reply-To: <0102018656dabb86-9eab0bd0-639a-4de2-b6ab-c94279a92f0f-000000@eu-west-1.amazonses.com> References: <7d032f82-9d16-edff-b548-3c01f6ea68cb@housseini.me> <0102018656c98091-28c05c5e-9dbd-449a-8af2-dbe7908056c4-000000@eu-west-1.amazonses.com> <877cwi4q13.fsf@localhost> <0102018656dabb86-9eab0bd0-639a-4de2-b6ab-c94279a92f0f-000000@eu-west-1.amazonses.com> Date: Wed, 15 Feb 2023 21:10:26 +0000 Message-ID: <874jrm4ou5.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: X-Migadu-Queue-Id: 8743F2AA01 X-Spam-Score: -11.09 X-Migadu-Spam-Score: -11.09 X-Migadu-Scanner: scn0.migadu.com List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: CjYYnLUvVR7D reza writes: >> What you can do instead is creating a named Org paragraph with macro, >> like >> >> #+name: year >> {{{year}}} > > I tried this approach but it does not seem to work either: It works, but Org does not include variable assignments to exported code by default. See org-babel-exp-code-template. The assignment would be done if you execute the blocks though. Note that year will have a value of "2019\n" with trailing newline. Yet another approach is including common :var year=2009 header arg. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at