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 ms0.migadu.com with LMTPS id 4AaZNIM6GGKKSAAAgWs5BA (envelope-from ) for ; Fri, 25 Feb 2022 03:10:11 +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 aMpkMYM6GGJlTgEAauVa8A (envelope-from ) for ; Fri, 25 Feb 2022 03:10:11 +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 E046FAFBB for ; Fri, 25 Feb 2022 03:10:10 +0100 (CET) Received: from localhost ([::1]:54028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNQ3d-0000cw-IP for larch@yhetil.org; Thu, 24 Feb 2022 21:10:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNQ2J-0000cC-2Z for emacs-orgmode@gnu.org; Thu, 24 Feb 2022 21:08:47 -0500 Received: from pb-smtp2.pobox.com ([64.147.108.71]:50063) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNQ2H-00028U-4l for emacs-orgmode@gnu.org; Thu, 24 Feb 2022 21:08:46 -0500 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 72018FA6E1; Thu, 24 Feb 2022 21:08:40 -0500 (EST) (envelope-from wtd@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=date:from :to:cc:subject:in-reply-to:message-id:references:mime-version :content-type:content-id; s=sasl; bh=bVvvbS2JI7Wydga8zsG/Ljm77CQ KfwQm1628LjQya/I=; b=RxFbAYQ928Egjm9wUCISluItKIMNoMKJuOnyPB5PYaR 30znxMiI1gi0KAGoJPuCw6OjX9fNmh2wulUije57BGfX0eefj9d4OXYgDOtWa2Hw Ec66k1Zxttvmt0IgeN5vJnSBhdexZCho7RGoEXGeov7fGCeNyYyzxTu0GPbW/b1k = Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 59946FA6E0; Thu, 24 Feb 2022 21:08:40 -0500 (EST) (envelope-from wtd@pobox.com) Received: from shell3.miskatonic.org (unknown [199.103.62.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id CBA62FA6DE; Thu, 24 Feb 2022 21:08:39 -0500 (EST) (envelope-from wtd@pobox.com) Received: by shell3.miskatonic.org (Postfix, from userid 1000) id 6C87F120783; Thu, 24 Feb 2022 21:08:35 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by shell3.miskatonic.org (Postfix) with ESMTP id 675D71200D7; Thu, 24 Feb 2022 21:08:35 -0500 (EST) Date: Thu, 24 Feb 2022 21:08:35 -0500 (EST) From: William Denton X-X-Sender: wtd@shell3.miskatonic.org To: Steven Harris Subject: Re: Beginning with org-babel. In-Reply-To: Message-ID: References: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="1741096510-1740917792-1645754766=:66839" Content-ID: X-Pobox-Relay-ID: D95B3AFA-95DF-11EC-8491-CB998F0A682E-56320186!pb-smtp2.pobox.com Received-SPF: pass client-ip=64.147.108.71; envelope-from=wtd@pobox.com; helo=pb-smtp2.pobox.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: emacs-orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645755011; 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=D2FTIGp3XBQsCM1ayFjNN+QbwovARsR9gUe/XC1ULjA=; b=nrbwWbHKtsygtWAcsx5JguRsOZTUxdGX3XoQSW4j4PaGG7dEas8FVOV9+zlzEakYqR2HWP XSTat1Jqtx1zDdIK94oRmfu+EHJnf1VU+PVXf6ZQVFQAb4j4o8xIVaCCs3+Wd0er3p+7Dx Ios9VbNFUQklMZzEIUj7w+suVqdxREeD4uYtL25F0h/aUKxYvK3RHyKGPgV1RsHb9oEPx/ ZymUrqj8XfcGBiv8ihcUtM2yFp+4WL9Ldes1f8e9WEojl2V9nEZP4HYz0olR+/Qxo48tT4 PFcQMbVGFvftMPFshMuZd11xINLL8Hw3hCWCxaFNrRAfa2qmsrBx3epGCe8LIw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645755011; a=rsa-sha256; cv=none; b=BT92teDLLdG7vTFtA4DnFq8LpIy6N4+xpLu4aGs8ZCdHxnTp3tCa6ZiolpCKdd0F0vZbaL 1IM+G6bliXSByYugnQaWmBFPN6qROs/CObYi9vWeYwoLn286ayIdnoK/lWveCmpzSwPa1h XnQLVb3iqvJuegH5Ucu7VE5KH4NUuUaf2YK2wsSLr1YoFas+p4p2paZItpFJsLHJ5sHrIb lKMDvUFb3iingmG+yg2RpAQeBu6yQ87uaAOqzwvsSdO6l12EySqHUi92qBiRR1cqXy38UY fyyZBfrPTIkpjPXy5KSnQjnswqgV2q/Oo9nDG8/gUBR41Haas9C19q/9syrCQA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=RxFbAYQ9; dmarc=pass (policy=none) header.from=pobox.com; 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-Migadu-Spam-Score: -3.43 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=RxFbAYQ9; dmarc=pass (policy=none) header.from=pobox.com; 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-Migadu-Queue-Id: E046FAFBB X-Spam-Score: -3.43 X-Migadu-Scanner: scn1.migadu.com X-TUID: HuM2v8Kov2XV This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1741096510-1740917792-1645754766=:66839 Content-Type: text/plain; CHARSET=ISO-8859-15; format=flowed Content-ID: Content-Transfer-Encoding: quoted-printable On 25 February 2022, Steven Harris wrote: > The current problem is that I have a config file that I want to substit= ute > a value into. I want the conf-mode highlighting. Conf is not a > programming language of course, just a text format. > > I'm trying something like > > #+begin_src conf :tangle yes :noweb yes > [defaults] > private_key_file =3D <> > #+end_src > > I have tried something similar to the SQL comment example in the > documentation to no avail and also setting :var headers. How can I > substitute a value here? I think there are a few different ways, but they depend on Org knowing ab= out the=20 language of the source block (as I realized after writing most of this, a= nd=20 deciding I'd send it along anyway in case it's helpful): One way I do it is like so, first with defining a variable. #+NAME: RUBY_VERSION | 3.1.1 | Then, in a source block, call in the variable with :var, like so: #+begin_src shell :tangle conforg/scripts/ruby-install-personal.sh :sheba= ng "#!/bin/bash" :var RUBY_VERSION=3DRUBY_VERSION rbenv install --verbose $RUBY_VERSION rbenv global $RUBY_VERSION ~/conforg/scripts/ruby-install-gems.sh echo "Now run bundle install where needed." #+end_src I'm using the RUBY_VERSION variable name in two places: first on its own = in Org,=20 then in the shell script as an environment variable that is set to the va= lue of=20 the Org variable. No point in using two different variable names for thi= s, I=20 thought. But in other cases one would want to. (This is from Conforguration,=B9 my system for setting up my dot files an= d some=20 languages or services I want to run from source.) But Org knows about shell scripts and can pass variables in to them (like= it can=20 with SQL), and Org doesn't know about INI files or other config files the= same=20 way. So (unless I'm mistaken) this method won't work. However, surely there's another way ... Bill =B9 https://github.com/wdenton/conforguration -- William Denton https://www.miskatonic.org/ Librarian, artist and licensed private investigator. Toronto, Canada --1741096510-1740917792-1645754766=:66839--