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 +JC3Mgub82OrcgEAbAwnHQ (envelope-from ) for ; Mon, 20 Feb 2023 17:08:43 +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 6CizMQub82OydAEAG6o9tA (envelope-from ) for ; Mon, 20 Feb 2023 17:08:43 +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 7ED16268FC for ; Mon, 20 Feb 2023 17:08:43 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="hPkO4jQ/"; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676909323; a=rsa-sha256; cv=none; b=XiggQTS6vCuCsf3QDMq5BBfVyb5nVaE5xVDe0EzYT5L4r3J/x/BVEhp6EMXXL23NSJcf/J hxTA4yGDWrVI/3kcM+++dX+jxHQoKW8ZJjr1lz659NDh4TDH3IvTuiYAm/pDDoxGduOCHk y19zCQNaGTfo3I1IPuksj8VFQw7oni/ZiSyPKSRoZylgrIU8zPiVP8v71T3YaPdUqSO48r N5SSqW6FzQGP3trWaPIPosSesUDTo9aKywHJTu0y8y62yVWK3NDH4njdc8LLxTx0SuBOdI QxRbI6IZBfk0N+D1e/uJN5UGkhCYO4x9unZxboCFEVNdewXu5zLAdbUpV8jl+w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="hPkO4jQ/"; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676909323; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Vd9F0A3S0gKKebjAmlLz9cQPOiEuIAICaPbALu/FQMY=; b=ohU7p7iAX12+eB07xT4i+Z+hUnQlxkTVqs7anxMqj8v2UqH6LlcxnsgUaGueGV1zrX//67 oRlImymoD5XnSjB0kDtd81gYwvOzLxlrJGXoK3c24KOMhYOHUqP6Smp33jP2mQibrj4Pl5 kwkOAMlLZbmhkY0+k926p9KneprcwQ2pXi0C+8Qkm3gUbJ3rjo0zEiKLWk9u2cs3CVbhpn VLGIM3bsO7+4o1f1zLlxnZv3bdRR+HI9VQTSD1BSZ0rWUzZ3puAVcvBCj77J8v2KoOgBtf G9wPXULhwaPo6K4gDqvUg+3imWuTfl9YN7GVfgmE/Az2Z1na7xASbOpQQWNf4w== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU8hw-0005uk-S7; Mon, 20 Feb 2023 11:08:04 -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 1pU8hu-0005u7-PA for emacs-orgmode@gnu.org; Mon, 20 Feb 2023 11:08:02 -0500 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU8ht-0007Wd-4p for emacs-orgmode@gnu.org; Mon, 20 Feb 2023 11:08:02 -0500 Received: by mail-pl1-x632.google.com with SMTP id t14so2272210plo.2 for ; Mon, 20 Feb 2023 08:08:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent:from:to:cc :subject:date:message-id:reply-to; bh=Vd9F0A3S0gKKebjAmlLz9cQPOiEuIAICaPbALu/FQMY=; b=hPkO4jQ/xKwku9vjZ9gx8ONER9NnwyLmF7MXgSHACskthJvwo72fxJAAjmmVmFJA40 aytfgpGTaI3tEzfK/mRC2iKlOMnarbCDs6VhCGJmefdi2a9o/cRpl34QNkm1em+mjkll LT0UNy+mUx+OZ02l8UzASEJ11EFsYl7Y1W6z+xvN3MhFUJQjsPHtzEy+LAGaJFtDjlgg ZKHMt4/BU7dU1zGQTyD9LpqyFZXXDh10hzAvagNjAGcfWJR9WnQYJo7bhwmi0R44iWLp NRRX9wyvJEMDdhL0+HmTon0YYrNvoGeF2TjzOf1w+fkPhz34Sa62kEE+xRsMVo3x6Xdg M3Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Vd9F0A3S0gKKebjAmlLz9cQPOiEuIAICaPbALu/FQMY=; b=lgYNR7Y9X9tUKm4uwKoL9gfiu7aVp3odY4tnySB7TvTqggDFT73y+12vIHQA2XWGIk MSK5N/lcR0I/oxOquJPlvBNW0Ezjcycqpm6SFGa/z1l1e4hOhm3dVv3SAejHQWSlNnMd HPL7PuscSyQt6udhYMY8Wb52bvHyb8zFagFXrIe9xnPm5xs9rWCO1JmX0HfEDKVto8J8 Ufly+pehEv7M3F1/PVQXHNz85L4wf8osn75d9F4a4nievHR22STc6oxMZ2FaoQGj6KVe +l/VGALd+YRLbjn03Tm7SewW7euLaMqNNl5s8zRV93m0Fv/TzkSM7+xpeICTuQOv2oMj 3rPw== X-Gm-Message-State: AO0yUKVKnd8aziJgdKsSYCXowfcY3ZJO2XNS0xYSc+pBCWAs0b4yuGB/ al2bfD6n6J7DkBNNEMw4KHD6VpGlXbEY71Kr X-Google-Smtp-Source: AK7set/JPJ9X1gUIYHdpzGX1NeOAEEt9C04L8iBkvDsSATen7sGho/Es0QXFhNhS3vtrXMuCxWE4ag== X-Received: by 2002:a17:90a:52:b0:233:f14d:c704 with SMTP id 18-20020a17090a005200b00233f14dc704mr3423765pjb.36.1676909279087; Mon, 20 Feb 2023 08:07:59 -0800 (PST) Received: from t480 (97-113-138-203.tukw.qwest.net. [97.113.138.203]) by smtp.gmail.com with ESMTPSA id ge13-20020a17090b0e0d00b00219752c8ea5sm813721pjb.37.2023.02.20.08.07.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 08:07:58 -0800 (PST) User-agent: mu4e 1.8.13; emacs 27.1 From: Ken Mankoff To: Org-mode Subject: [O] Injecting properties with noweb Date: Mon, 20 Feb 2023 08:07:57 -0800 Message-ID: <87ilfwpbfm.fsf@t480.home> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=mankoff@gmail.com; helo=mail-pl1-x632.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: 7ED16268FC X-Spam-Score: -9.86 X-Migadu-Spam-Score: -9.86 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: KKEpzCRDSvPH Hello, Is it possible to set variables using Org Babel inside screen, which does not support ":var" header args? I'd actually lke a double-nested screen over ssh, and the ability to re-use Babel code blocks under different headings, using header args or PROPERTIES to change variables. That is, something like: * Setup :SETTINGS: :FOO: default :BAR: one :header-args:screen+: :cmd /bin/bash :session (org-macro--get-property "FOO" "") :END: #+NAME: setup #+BEGIN_SRC screen if [[ ! $(hostname) =~ "host"* ]]; then ssh host; fi <> # eval <> ?? echo $FOO #+END_SRC Should print out "one" (the default setting under Setup) in the screen terminal. ** OTHER :PROPERTIES: :FOO: two :END: #+BEGIN_SRC screen <> #+END_SRC Should print out "two" (the sub-heding adjusted property) in the screen terminal. I'm OK with not being able to inject arbitrary variables, only the ~10 or so that I need to be able to set, and having a code block that has these 10 hard-coded on the LHS, but with some <> or something on the RHS so that they value of the variable can be controlled using PROPERTIES under headings (better yet, header-args, but I don't think that is possible). That's the behavior I'm after, but am having trouble. I thought something like: #+NAME: get-prop #+BEGIN_SRC emacs-lisp :var prop="FOO" :noweb yes (org-macro--get-property prop "") #+END_SRC #+NAME: inject_vars #+BEGIN_SRC shell :noweb yes # echo <> # testing echo export FOO=<> echo export BAR=<> echo export BAZ=<> #+END_SRC #+BEGIN_SRC screen <> echo $FOO #+END_SRC might work, but it's just printing nil. Thanks for any suggestions, -k.