From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 wG9oA5IodmLsTwEAbAwnHQ (envelope-from ) for ; Sat, 07 May 2022 10:06:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id QHUzA5IodmKsYQAAauVa8A (envelope-from ) for ; Sat, 07 May 2022 10:06:42 +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 7C8B71F614 for ; Sat, 7 May 2022 10:06:41 +0200 (CEST) Received: from localhost ([::1]:36776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnFSa-0001tA-8f for larch@yhetil.org; Sat, 07 May 2022 04:06:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnFRK-0001sz-6S for emacs-orgmode@gnu.org; Sat, 07 May 2022 04:05:22 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]:45592) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnFRH-0006HJ-3z for emacs-orgmode@gnu.org; Sat, 07 May 2022 04:05:21 -0400 Received: by mail-lf1-x130.google.com with SMTP id p10so15995457lfa.12 for ; Sat, 07 May 2022 01:05:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=RsrTXLAOR107GcSKCnPfbgvc0UX5Z3Nrj3wHzPzG5vg=; b=OMCt4kRbgIa/Ga1Ht6WC+2JEArvgvII/fnUVDBC2vKSzPuv69XumxqN//BMSaZOO6j xStDcLO56lBG6LtJPX+BZe01cgGYbb/PYB90j8MfK3jWIT8ELeVNW7EIxJP/xJho5eFe RLCifO0DSMOHAuN92hPQYr/UOEJdATad/x7OJxK3uttgKWDrO62Hbg2R5yDadBq9wx78 PAnOAiKc/W/x+m5yGsZZX+GBsSqxZHbdDqksK4UmtkJ5FHbhoM4c1ueWfj45TJzEuDn/ cO2I+UM2CNlAMzk2iQdWSRhw+rm6/awDy2Usw3tKjgLlk7MfJ5QnTxx1j9uGBfzftSIO KjIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=RsrTXLAOR107GcSKCnPfbgvc0UX5Z3Nrj3wHzPzG5vg=; b=MRSSYVfJL9EoazzikbMD8WOuAcuXrEt43/qav2HPix0x1Q5FyClvcxL4B6SiUMm89O HUB5MmzkbDnr0UhmiY++unz/7a+l+Kefg8HhXJpgkePVuSN+3B8jS2mPVwwlpM+FbfeY MuShPi0o7Hd5u5Fqr/r6GmivNmW3w4dm8pEaX7o5pmEaTb9KkJARNVr5Slp54wNNRkGC MNoE89Jbnt+BlQ3gnb6cINVz+72k6JUTp62vNs41LoMcT2QwWEYV4qmyFGKJUbWu6iTq xjutdh+7QAogmckoOBKitApYr+uO1RCZ52ZPK/G4ilYpSVa3im4R2wLyazE+5JBnRs8f XxHA== X-Gm-Message-State: AOAM5309A0uuTwj5HqV53lOIIO6jxw5+5C1ctMMwSRjMmsaAJn3jwFL5 DKKlm8gL4/XNQ8oaj681nq4= X-Google-Smtp-Source: ABdhPJzOj4CboU8stGRRVMycE/LBsnkJ4n9j2VJlbT4HIjkPWfjtIkqGr5gNzZO5KqrXW4OtE1MFsQ== X-Received: by 2002:a05:6512:3a94:b0:473:de2d:acf with SMTP id q20-20020a0565123a9400b00473de2d0acfmr5419997lfu.136.1651910716479; Sat, 07 May 2022 01:05:16 -0700 (PDT) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id x21-20020a2e7c15000000b0024f3d1daebbsm898648ljc.67.2022.05.07.01.05.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 07 May 2022 01:05:16 -0700 (PDT) Message-ID: <12cd2bb0-584e-dcff-baca-1ed27d0281ff@gmail.com> Date: Sat, 7 May 2022 15:05:14 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: tangle option to not write a file with same contents? Content-Language: en-US To: Greg Minshall , Org Mode References: <583051.1635393898@apollo2.minshall.org> From: Max Nikulin In-Reply-To: <583051.1635393898@apollo2.minshall.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=manikulin@gmail.com; helo=mail-lf1-x130.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, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651910801; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=RsrTXLAOR107GcSKCnPfbgvc0UX5Z3Nrj3wHzPzG5vg=; b=oXnKYjpdeh3lw7LSZEiXXnqa9/j48NNtUF1QB/sB11QSEmlSjuQsqAJ4nZ8seOMnDLY7kh 1u6p3gDItpiIfJ47hAP9Rg48tOOPlYqBYAydSV8HqONJ8W/EhyymFefpJ/y6jmPC1jj8ki HA48Lc6kE8+kYevetGPiUf0pp1C091PhP4tCfYj0kw2Eoz4/a8cyPdsRtwNqiak8A7Ht1+ +mhSKMaQbMglQhZiadQbovpqeAFT/rsephR6/dx9Fq9z0PVjL2/IHv7mTC/slRpgF4n2Ec VocfXUgg/c8kYiXS1lemOToPfj4QWtsY/YnpaZjNIVn80T5Pw5oqKZAyWSVfSA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651910801; a=rsa-sha256; cv=none; b=RlORZlrCpD3k3zUnmRcTcU9gtwHLhBaV7TSo/rQBgFNn7eUdKY/jnI8loaDt5eSPlUhpvk zmNxxEGHCNFBwQFVT5FmpM2QTi68fxF2jjRbvK5Purc9hmqO/ndbTZ3ISAaYkSRsRe+YCY deaSAJnAq3dcvHR/CDjC270UHo0mHzZ8aEe9YJl8zdgY2xwHP0pVExm0pT8CDu7PcwuqWf 6zOaFY/RVAcxe38UkZSr24iv5ePDrM34b++J1H5jXE38WGgHEb/R++LDadXLs2V7fOch4f vP5Dxtk6trvn4EI8DT0J/AHWC7qs7UoOUhBJ39ZWEl8RWIa7wSxAaAfml7dzWw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=OMCt4kRb; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 11.70 X-Spam: Yes Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=OMCt4kRb; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 7C8B71F614 X-Spam-Score: 11.70 X-Migadu-Spam: Yes X-Migadu-Scanner: scn0.migadu.com X-TUID: 77oNlafoxcKp A couple additional notes for the case that someone will find this thread in future. On 28/10/2021 11:04, Greg Minshall wrote: > > i wonder if it would be reasonable to add an option such that, when > tangling, `org-babel-tangle` would not write a file with the > already-existing contents of the target file? > > this would be helpful, e.g., for those of us who use make(1)-based work > flows. It was not obvious for me earlier that it should be namely an *option*, not just change of behavior, since e.g. `org-babel-load-file' relies on timestamp comparison of the source .org file and the derived .el file. I am unsure concerning default value of such setting. It was an issue with `org-file-newer-than-p' that reminded me about this thread. P.S. Timestamp comparison is not always reliable to determine whether prerequisite has not been updated. Earlier python had timestamp of .py file saved in the header of compiled .pyc files, but at some moment they switched to hash. https://peps.python.org/pep-0552/ PEP 552 – Deterministic pycs