From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id OKliL/Z672OjZwEAbAwnHQ (envelope-from ) for ; Fri, 17 Feb 2023 14:02:46 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id SIeJLvZ672PhLgEAG6o9tA (envelope-from ) for ; Fri, 17 Feb 2023 14:02:46 +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 73E402A57C for ; Fri, 17 Feb 2023 14:02:46 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=bppByImO; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676638966; a=rsa-sha256; cv=none; b=oVSd5MC4TKRGHvyQVQAEbRFHzlMEtJgG8oojWekj+g9/06PYNP6Ev7JNfgDR2mnrIo33Hz RLMnj9SHHK1r8Aw9EDDXmHcoAatgU+r7yE3OOzZHEZoBDDkGeO4AkmlgFTeGYNFPoQNI2f oxZzVGslKnQSMYLNaaTD+qQTVwiyoLTP+HgW/mJ1lw5yXS8J/EVq2sSAoldGMrmO4eE5qh tlwENkNHmXEzPUtxR3sLuMB17VLEBUL017vAtO/khi98+DzwOeb6tEpq4AzjNDZFFd0nMM OcD8kUncdG3kq82KMbzCg1bfyj8gmWUrT123N74cbHCPaX/VYwJwUWs3cQ2kPQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=bppByImO; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676638966; 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=QH5w/oADt1AHVZeFD5TPou2Kyo5KS0GKOEvW0tztLqQ=; b=luamuXMODPI3pT2sQ5E0BgZ9DubEjXYF9r+ZNzytsQVLcgTB0zPYfWQi9oKNKXHQQr/9Zp MYmD8lSFwUobK6mU12YsNzqgjXyjm0kHHM1cX3kOodXclr9AfddFgolUn0nJCqMfCLm8RO ueqpequ4dVK90+qI8cgJoxHfWEANGfoKEfPspjlJ3mqe6UIN12cr8fXtwNswOnoWuddYX2 /I9/yeZzDZ6P9MdlGedQ8Mrrms1B4nO6IrTFdsWCGCQFpTjU/0thO0infdnky//lsu4SD1 IV9BPlTT6Ej+B04faGgGrRGXvnvA8fmxt3jwtIKCz0cYogobuuvtKatoCJfNtg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT0NC-00087E-SR; Fri, 17 Feb 2023 08:01:58 -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 1pT0NB-000876-8k for emacs-orgmode@gnu.org; Fri, 17 Feb 2023 08:01:57 -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 1pT0N9-0002zf-1B for emacs-orgmode@gnu.org; Fri, 17 Feb 2023 08:01:57 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 493E124039E for ; Fri, 17 Feb 2023 14:01:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1676638912; bh=CtXOXCPrAaqlBqDBJQRIGbJs/gIBaTkj/xzLunv4Tck=; h=From:To:Cc:Subject:Date:From; b=bppByImOw/S29EUt29Qz4R3/64MdvnGSASzOVCPn3MYhnWIEQpSIYk1p9ryM7LHLZ xsxmqG8E6lmF4qrugi1xDsBSVykYQuVOlxYjJnMiEY5/yV94xn5hCtkKJYO8QjPzfk tMiseRNvnU7GptmIedIW2cY5VWaIWXFlN6i7TQ5dfIfz1B08WKMteMQI78l2Du9823 2+XGHm95IzfQJtWb8QQCec6xycZTzjTB3ZidosX8AwjVRVSipZsYT0s2psBbSPGgOP ejZ0f2Hk6DmQuj4OhWLvyH//qwAiHcqn5C0LN9I5uG8QYE/DvrO7f+VO7agII1uY1L V9uBakCXDc81Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PJBly4fPnz6tmc; Fri, 17 Feb 2023 14:01:50 +0100 (CET) From: Ihor Radchenko To: reza Cc: "emacs-orgmode@gnu.org" Subject: Re: Cannot expand macros through included org file In-Reply-To: <0102018656f8a2f3-2178ae87-8ca6-4f68-9a7c-7f2676084710-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> <874jrm4ou5.fsf@localhost> <2b6f1944-66e1-c491-40f5-420018411312@housseini.me> <0102018656f8a2f3-2178ae87-8ca6-4f68-9a7c-7f2676084710-000000@eu-west-1.amazonses.com> Date: Fri, 17 Feb 2023 13:02:28 +0000 Message-ID: <87bklsbg2j.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: List-Post: X-Migadu-Queue-Id: 73E402A57C X-Spam-Score: -7.41 X-Migadu-Spam-Score: -7.41 X-Migadu-Scanner: scn0.migadu.com 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-Flow: FLOW_IN X-Migadu-Country: US X-TUID: tIUGZqX9GhkY reza writes: >> 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. > > So I have to set this variable to true? Check out the docstring. v org-babel-exp-code-template >> Yet another approach is including common :var year=2009 header arg. > > what do you mean by common? I want to have a report for the years > 2019-2022 for example. report_2019.org: #+TITLE: Report 2019 #+property: header-args :var year=2019 #+INCLUDE: "template.org" :lines "2-" template.org: #+TITLE: Report * My headline #+begin_src emacs-lisp :exports both :results value :eval yes year #+end_src #+BEGIN_SRC bash ./get_log_file --start=$year-01-01 --end=$year-12-31 #+END_SRC #+BEGIN_SRC python log = pd.read_csv(f"log_{year}.csv") #+END_SRC -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at