From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WGyhF8VJ5mBn3QAAgWs5BA (envelope-from ) for ; Thu, 08 Jul 2021 02:41:41 +0200 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 0Mk+E8VJ5mAwTwAAbx9fmQ (envelope-from ) for ; Thu, 08 Jul 2021 00:41:41 +0000 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 aspmx2.migadu.com (Postfix) with ESMTPS id C3F681F82D for ; Thu, 8 Jul 2021 02:41:40 +0200 (CEST) Received: from localhost ([::1]:53580 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1I6l-0001BF-SR for larch@yhetil.org; Wed, 07 Jul 2021 20:41:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1I6O-00019x-PG for emacs-orgmode@gnu.org; Wed, 07 Jul 2021 20:41:16 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:33755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1I6N-0005RY-9p for emacs-orgmode@gnu.org; Wed, 07 Jul 2021 20:41:16 -0400 Received: by mail-wm1-x32b.google.com with SMTP id g8-20020a1c9d080000b02901f13dd1672aso4040335wme.0 for ; Wed, 07 Jul 2021 17:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PoBoXCJUH4zY0IVw4mWtf9J8lKdM+PUBLJtnGtV4GM0=; b=ho4V2EKl9rDM5ooi24ng7iwtoLqA9q3KPl1KQfvtHADlgN1NlNZYBBpDIvx07eBxLy 4VyrtPelrU/uhBew9wvE88yx08Fz9bn+jorcuPuIbZ14Zldm1wi3DAuBBFc2EwWxU2Wj yJ+RwbSuElNJZRHHP3EAjLkVA9VOjM7z1kgnhzn3HRWKfwrhuzwpEfFAkEs/JOSWLhMF SxnXwma7Qjmlv0hJ+u7qlNSBRIc4J+BpGR/H6IiG6HxTFBcgRL+cx5mn/AG2AVz5EQS8 5/EkpssbfBWFWDcUzOm6s2q5Nmeo6jFsRRMnZVWBoP9/kuoqRrbYx4fH6MsK0GZP2nT5 DOlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PoBoXCJUH4zY0IVw4mWtf9J8lKdM+PUBLJtnGtV4GM0=; b=MSaaZ/7sq0fSOAJMJCKGJJU6f1RC2Svuc8JCRHSzNQW0srly7Wv8PAOzI87HOO/E6A Kb/nqql6exffQaf0t27I2WkEXFgHToQ6EoLXpSmpqtQD8JoHrSH3ceMq62COuFLVJMRb ANbAUvsOg+KUSac/3TbYbt9aKY0hZvirGTUGQcj1Pnf46TIMdjiYaDC1PCnKxWp3KRwK HsSEPD3IY39lEDzBMD4xozB3flaSvJUW+yUuW+Ke+nfV0/qfjx12Q/Bvw8saAZavhmTb +Wnyv53dU8b/O5uxWEWhcpw36DpJUYyhySM97aXO3RV56Lu/ETQ7lAkBAaMacwNMapRT o6lQ== X-Gm-Message-State: AOAM533csf49TfdYfdwXDtCt453FzAN4CoTJZZcLyV8wD28loeO2iw+k /fscdyikBrTZJmF/uzuaN8vPXJe7/Lxl1IvuIC0= X-Google-Smtp-Source: ABdhPJwCYHOx5++M0Kt9WsNa4ZXSppadHj3ClFK1ADc/W1+oBTiNeabgrMyImchImoS2kXYjay4+vHCrkm6At1GQ6+U= X-Received: by 2002:a1c:2584:: with SMTP id l126mr1870132wml.83.1625704872481; Wed, 07 Jul 2021 17:41:12 -0700 (PDT) MIME-Version: 1.0 References: <-0ZoEP_lzUvrnWSq9TwiYHNJ0Spa94xjiTOF0TU8np0pYgHEPx-62_dr5xBMd3VUu7frSRXxiAFje99v2jeaJg==@protonmail.internalid> <6nablMuhQkeviB-6VFvbgkSFIQUX0t1Cn9X8VKPNkMNmTx_r0NlLhnpTJQyUB9EjTZEtB_1xnumcRgd_UEl_mQ==@protonmail.internalid> <87h7h7nakd.fsf@gmail.com> <3116936.aeNJFYEL58@bl4ckspoons> <87r1g9lmp3.fsf@gmail.com> In-Reply-To: From: Tom Gillespie Date: Wed, 7 Jul 2021 17:41:00 -0700 Message-ID: Subject: Re: [PATCH] Allow tangling to a list of files To: Jacopo De Simoi Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=tgbugs@gmail.com; helo=mail-wm1-x32b.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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tim Cross , emacs-orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625704900; 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=PoBoXCJUH4zY0IVw4mWtf9J8lKdM+PUBLJtnGtV4GM0=; b=BjT009h8gGUaZ6P4kNWAMrrJKQxmxATQ2Eo/Wnx8UAieAaUB14VOV2w38/U8h46LlCBPmw oR7xfOclsoxtsUacdwPd3DJMQOXeyjpfZdOGAOVGO5VqLyW/ydV1va256LCDZBRTmorNVF Hm+zMumOqw8zACGbS+lR0qtlrhBHRdCVzSv+egvlkqsTGrmEcVgfLI2Bmri23OWlQ/EjGb h5MZadjScW9pzy2IKBhxVn1r0i1JHRisYw82gfu6AR9v67WmTuOXnGjXuZELHQXzB7WZMc c9/WjSUJICThpR4AYMflAggjz+LJat1enmbTY1c2ThR3RnuhluiygOLb/3yg6A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625704900; a=rsa-sha256; cv=none; b=R58ljMSRVsLNiTFim5ZK4eGhPen5RnJTAWeh2dMH2pHnFBKtZjaGRsZv49cnOPDfsfJ0bX iLWtXlZiwevymkx4g02Eua52bYJo99W2mL4F7sfy1ql6rFe2GEV/fK26V4jiyh5Bh8B68s vTaNfiOemM9Kn7n/TIOObVXPJcUk4ne/7K6eE3t5ognCDrB19uEbWWrlPy2zLpSW1MPwhI lqk19tiVG00fzoUlUYesa3VIj4O/5eGZA6vja7V71C0X/jBkDER7mO3LCUYh0cNdkC1wGX i7qkdXDTFR3kyx8L2vY6CbwoHxOl6upYtTcqoEGNdf4etcduLu4+cO9ILKODFA== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=ho4V2EKl; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx2.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.11 Authentication-Results: aspmx2.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=ho4V2EKl; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx2.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: C3F681F82D X-Spam-Score: -3.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: MAs9u/5G7cUd Reading over this with the new information about the use case, it seems that using noweb to manage the many-to-many nature of a mapping between blocks and files is a much better way to achieve the desired result. In addition it is already supported and does not add more complexity to an already complex part of org. The one area that a noweb approach does not support is dynamic construction of files at runtime on the basis of some information that is only available at runtime, however that does not seem to be important for this use case. Therefore I suggest that the tangling behavior be left 1:1 block:file, and if there is some desire to tangle to multiple files then noweb should be used with multiple blocks. Obviously there is some performance penalty here. Also this doesn't help with cases where we want to tangle to hundreds of servers using tramp, but if that is the use case then I would suggest that that operation not be hidden behind :tangle. Instead tangle once and then use another elisp block write all the files to their final destinations using tramp, ssh, or some other means. I personally have use cases for things like this, but even so I don't think we wan't the :tangle parameter to be the way to do it. I would suggest instead that if we want to enable a tangled file to be automatically distributed to a number of different locations that we provide a separate header argument so that the functionality is not conflated with the tangle functionality. I don't have a good name for it, but the objective seems to be something like :tangle-copy-to that accepts a function returning zero or more paths, or a list of multiple paths (I don't recall how/whether any of the babel args deal with accepting multiple values). Best, Tom