From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id eKCkMy1cMWRtZgAASxT56A (envelope-from ) for ; Sat, 08 Apr 2023 14:21:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SJymMy1cMWSxMQEA9RJhRA (envelope-from ) for ; Sat, 08 Apr 2023 14:21:01 +0200 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 83ABFC823 for ; Sat, 8 Apr 2023 14:21:01 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pl7Y9-0005Kg-2m; Sat, 08 Apr 2023 08:20:09 -0400 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 1pl7Y6-0005KK-Q8 for emacs-orgmode@gnu.org; Sat, 08 Apr 2023 08:20:07 -0400 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 1pl7Y1-0001jL-Ag for emacs-orgmode@gnu.org; Sat, 08 Apr 2023 08:20:03 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 66EA124014B for ; Sat, 8 Apr 2023 14:19:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1680956398; bh=9OlaAxgqSQhuIgXR+gHU33uaDJjKSJNvnxlMqWewu/Y=; h=From:To:Cc:Subject:Date:From; b=Q3dfcI/mAsl6p1eY7j0Hzd4KRoSvYzZ2MPSJ+i7aOqXOjTS/DX7KAQ+I5MBs4syIk fSZ9/6YSZvx1C1JWNhCOUw2XPdryfpoZi8XEsYBN/Mvwwp2bU+miMbDsAs7oSNnCoD QAAcu/g9Iz2sV4shhhWSyImyqypsFonlGfUdFAej38MabtnTaFK/juUeBAd5Um3wji 2zmDyZzBw+5lgwE5hrEuvAMDNRpDx1AE1XDR0P5C5pmIkKPyotGbKfkafbFr1esmUE nCBVIbvbWWcHZ/rb/AeWRQENW9zM29nthWL2Ab7hwF7NWe9KNixH2zgbQqW85ugOC0 fBjSc0LHbdG+Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PtvSY6Qb0z6twB; Sat, 8 Apr 2023 14:19:57 +0200 (CEST) From: Ihor Radchenko To: Ken Mankoff Cc: Org-mode Subject: Re: [O] Injecting properties with noweb In-Reply-To: <87ilfwpbfm.fsf@t480.home> References: <87ilfwpbfm.fsf@t480.home> Date: Sat, 08 Apr 2023 12:22:19 +0000 Message-ID: <87h6tqk1hg.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, RCVD_IN_MSPIKE_H2=-0.001, 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: 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680956461; a=rsa-sha256; cv=none; b=OTd45KAbAecJrHke/gkkxdSIOKZqCQsVjO/gwq/5azh4YLCyzSJiscfs2k8hIzPfzSheQV UP50wwNGJwoSy5rXAKYdSZv5vBFwqmyZxgGmkvevSE6c9jok7+t0LmrFzIiWTl6aYwppGw 4BDGYDHGw2mnmSbw48m0yoT6Prtm5TqQgj+FrRh9u/qHqqu36n7B30slJ0PaABP1bGZPjE 6HPTvObQiGg976VZxSFi+l3NtcQjqdR2GwM0DPyx7XOFskz19SLnHN0N8WVLm2Nm0+8Ikg QxWrAJnRHWRN5T6JThg5+D9lAkKpXiKRPFy0SUsyN15AEmuqrihQ9Nsf3erZYg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="Q3dfcI/m"; 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=1680956461; 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=jEiC/NdItlvM8EABC3jLWk7CXkctCMsxKI99ZRhyaXk=; b=bd1J7NKcfhvF+N10yNw5J2Fg4sucxDbNvnC//msT+UKE8VPUqbCnwuM1xYn6EfvtKwkd3N 9O1725kohmQOShKxAdRFYzu3JVWZQZrbNsov4rxiXesaJloHivij5yxr2VInR8Uyvtapcs ZIE/lkL0TZwaFyhlzm35GvacpDIk2Jolle7qFEYOSw6dT+xTjovTi7tcXcVrZeatkOa1OT IIdrnT8TN8hOn7HFCFbt2O3hjCE6JLZnhZ6jb74YFvd6YG8EvBXEzlgJf6m7hOONeS7pdv 6lwsXM1Ws7VCSj/4YIx46zHr9fHUS+yat0T9fU8KiVkPxasrSqVUd01qsUkHjg== X-Migadu-Spam-Score: -6.22 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="Q3dfcI/m"; 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" X-Spam-Score: -6.22 X-Migadu-Queue-Id: 83ABFC823 X-TUID: vCc70GVePmx4 Ken Mankoff writes: > 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: Yes. > ... > #+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 This did not work as you expected because noweb evaluates code block with point at that code block. To get the property value at the code block where you expand noweb reference, you need to compute the value in the arguments to the reference. Something like #+name: identity #+begin_src elisp :var x="" x #+end_src ... echo export FOO=<. Support Org development at , or support my work at