From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 2BkhHx8SkWYXawAAe85BDQ:P1 (envelope-from ) for ; Fri, 12 Jul 2024 11:23:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 2BkhHx8SkWYXawAAe85BDQ (envelope-from ) for ; Fri, 12 Jul 2024 13:23:11 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=rtQNZpIV; 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=1720783390; 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=FUYb0Zi16EwzFZvsRwLIuyLAKhB5zM2e1ZUTweenVqE=; b=IT65Ulpx0ak7aplxABRjX7tNMxnc80ARN1iGDWNP4adU9pezcVUF5ZcAd4gi1wYDkxrTjF pekaJUw8qFmc6w7xg6VqX9mKj7l+HAHNZ1ifeHY0zohrv85A7UUivSJf9Az74zYKCWW5Dk MDkfRFFTG48pAn/EoTMwxDiiizdQMwsLQf0kOIeC+0yqFQ/CLLgDZb7y/QWPn8Qaa7XjX1 kZJAfhCZGtiEFyg875DO/dJW1fx5Y/Z/CmmN7ZMSDWs/AMbW4Q0eEkRFtivlnDUR7AwO+g pcOLEUqniPHsYk4rsfzCMus+sijEodwMMNNX1CichEA1PK4hfwDN18Tus1pfCQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=rtQNZpIV; 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=1720783390; a=rsa-sha256; cv=none; b=cIevpO7qKYMn/VUe39NMlGeyZlJtShm8TiwEf6hbo7hsrVuomdsEF9PY5DvwRcToV9frjI vlvY8n++H/pu0+/gueYKphvQb4eyUxzpc9zRi5dVgDCr8C7CCeMWOS8CcIKTRYPUytXIgc cQu5yFYLC/WJHzyc790L8Fy1h5pwMLnJ2Zi98eevhkrFbIKEoovsnUV7xQEhcPG82VrELf olfqobV+a+B3oE/u041q739d2qMLCvD+y0g76v3vkTBR2Xi1LjOESGxwZ5K8VfReOz7cOg vq2hndKRnyYBM8GW/7QJ8E50YOxN79R4RYU19R5eoUrdQQ7lI6OOxo2rzebo2Q== 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 6012B14A4F for ; Fri, 12 Jul 2024 13:23:10 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSELj-00034Y-EK; Fri, 12 Jul 2024 07:22:03 -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 1sSELh-00030K-VJ for emacs-orgmode@gnu.org; Fri, 12 Jul 2024 07:22:01 -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 1sSELf-0001By-Fb for emacs-orgmode@gnu.org; Fri, 12 Jul 2024 07:22:01 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 5B29524002B for ; Fri, 12 Jul 2024 13:21:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1720783316; bh=ywWYaIKUSygDl0f253Vh/LQVpUN9wEXinH6kM1DSojg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=rtQNZpIV6t8jJMakd2ULXgTsYF2yfL5vNuqFZoN9u7goNVyq10fNnUZ6cTth5FaYa yntpI0W81QjxqBMB/qIexwpTxhdw5iPqKYuKgd25tzPPKjUrbE759dTzSQEJ4ixHRB f89Bc9HfHquIKi6uMJYq4i5Yjb5DE4/GYuutP9OjU4vCcW41+NotnsDFR+evTTDo/M a6wT1nZtArs064DaezSpCNkZRCLanrhm/wvb+0yR2gc+LWnxAmdRKLuIA+F6zPj9Qa 0nF722Pn+fkL9V162t/G91bIrwQTrs91diFkyZ5IRs8A4dSl/ZvDa+XPnkn+T6Atbr RuvDMG2T/L9Uw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WL8Lq6KZ6z9rxD; Fri, 12 Jul 2024 13:21:55 +0200 (CEST) From: Ihor Radchenko To: Phil Cc: emacs-orgmode@gnu.org Subject: Re: [FR] org-babel-n-tangle In-Reply-To: <6a7129e2-9d26-4292-b8d1-1a3e3db90f4b@7d.nz> References: <6a7129e2-9d26-4292-b8d1-1a3e3db90f4b@7d.nz> Date: Fri, 12 Jul 2024 11:23:29 +0000 Message-ID: <87ed7y4zwu.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_H3=0.001, RCVD_IN_MSPIKE_WL=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 X-Migadu-Queue-Id: 6012B14A4F X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -9.63 X-Spam-Score: -9.63 X-TUID: Z5gUVDsOCFEx Phil writes: > The ability to tangle to multiple destinations is a very convenient way > to manage cluster configurations. No, it's more than that: it's an > *awesome* way to deploy and keep clusters configs and repros well > organized. > ... > #+begin_example > #+begin_src elisp :n-tangle "hosts-A&B/tmp" :tangle /x/y :mkdirp t > (org-babel-n-tangle '(4)) > #+end_src > #+end_example > > In the above example the tangled outputs goes to > *hostA:/tmp/x/y* and *hostB:/tmp/x/y* using a default protocol. > > In the absence of *:n-tangle* or when > *org-babel-ntangle-destinations* is nil. > *org-babel-n-tangle* behaves like *org-babel-tangle* > > What do you think ? This sounds like a logic extension of the existing tangle mechanism. Although, I feel that the semantics is a bit cumbersome. IMHO, a more natural approach would be (1) Introduce :tangle-directory parameter that defines relative directory to be used as tangle target; this directory, if defined, will be used instead of the Org file directory to expand the tangle target; (2) Allow :tangle-directory and :tangle-file to be a list of targets to write. Then, we can modify `org-babel-effective-tangled-filename' to account for :tangle directory and modify `org-babel-tangle' (as you did) to write to multiple targets. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at