From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ePIlF6ghemHhQgAAgWs5BA (envelope-from ) for ; Thu, 28 Oct 2021 06:06:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id YCQyEqghemH6UwAAB5/wlQ (envelope-from ) for ; Thu, 28 Oct 2021 04:06:00 +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 aspmx1.migadu.com (Postfix) with ESMTPS id 4E90D15379 for ; Thu, 28 Oct 2021 06:05:59 +0200 (CEST) Received: from localhost ([::1]:47502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfwft-0004MU-8s for larch@yhetil.org; Thu, 28 Oct 2021 00:05:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfwfC-0004MK-DF for emacs-orgmode@gnu.org; Thu, 28 Oct 2021 00:05:14 -0400 Received: from relay-egress-host.us-east-2.a.mail.umich.edu ([18.216.144.57]:48674 helo=tricky-euroswydd.relay-egress.a.mail.umich.edu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfwfA-0001hC-Hf for emacs-orgmode@gnu.org; Thu, 28 Oct 2021 00:05:14 -0400 Received: from narrow-griffin.authn-relay.a.mail.umich.edu (ip-10-0-72-130.us-east-2.compute.internal [10.0.72.130]) by tricky-euroswydd.relay-egress.a.mail.umich.edu with ESMTPS id 617A2174.9B8A1.548E3B27.3133081; Thu, 28 Oct 2021 00:05:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umich.edu; s=relay-2018-08-29; t=1635393908; bh=RJibDhQ3oQq5Szhzhos1E2SrxS7iRktbm7q6pKF1n9E=; h=To:From:Subject:Date; b=eXRvkoozva6MbtvtG7Ur2dp4Lto48dZirA8R4/a6UwV0LyTzIWUugLetRtPtgg3KX oZvs+mZL0ykZmF8z8BP5HBITQDxdbOnfPEwY4hIDEmydnqH3I/EUk4GOBuoNArrx9G TpbxKdqNY7CpBkMWaViQ2VkvHfplEWbBJgqQnkDkxdVyzIXhHtVjmH8Bqh5g469s/K d1HSDU16hVbZnxMQkywdRKAth49raM8VyT6fq8IjGq45BJ2h8UTIZmcRU8Zfu+G701 qichlmeziJYtI2+J2zm5Kx6m4M2RKC3iD50xO0/83IXi/jsXfLONsG9sCzxjDkMJWu MWPzsJp3bZhPA== Received: from localhost (Mismatch [95.14.69.235]) by narrow-griffin.authn-relay.a.mail.umich.edu with ESMTPSA id 617A2172.E0008.4BE0EAA1.3381501; Thu, 28 Oct 2021 00:05:07 -0400 To: Org Mode From: Greg Minshall Subject: tangle option to not write a file with same contents? X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 27.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <583050.1635393898.1@apollo2.minshall.org> Date: Thu, 28 Oct 2021 07:04:58 +0300 Message-ID: <583051.1635393898@apollo2.minshall.org> Received-SPF: pass client-ip=18.216.144.57; envelope-from=minshall@umich.edu; helo=tricky-euroswydd.relay-egress.a.mail.umich.edu 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, 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: , 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=1635393960; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=RJibDhQ3oQq5Szhzhos1E2SrxS7iRktbm7q6pKF1n9E=; b=txA3EFn2wK6MzLvgPE/OQMqLfb6B5YJa1lp2hVHp4GYcYe5geSysVDcPJa3T+zWKrLUNau 2AWaKKnJGVfX1bQm+FMScvDUiA+XVtb7eIhQrzxfvJZcmG3A6nQyW7x9C1UmbWKq/pfPOu wsFhb0mzCLKHJsX8iEfh3b3XIDkqxmiQGA4Qcp4/QNFletAQgd6X/tAyg7W/W7871vyxOZ 0DYvV8R9RBdiC80klsIQteBC102hYljUDgqEzZeudfAAZwaEtHRdB94p1oinOP/EUB/sYP t7BIpPL91iUuxLFivEPqwvqYHdPs68PKzRl4ZyScV7XYurwZLpsAN8zz3eoCeg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635393960; a=rsa-sha256; cv=none; b=dUCLBtiXPNhX9qkPXcnKYjLqIjPYqoTGPG7bU4NCeZb0amojvS+0fDh3qd6i7l+Hv6QOHp FFIVkp2IhvWsriBFFnVfek5RwRGqZ9QqnYArdbIa5rcNBr9MNRT8iWHcS6fbkqs88YZDHZ PyKpafswv4YicKPjYKcY8g6cWXLFB4U5MsTZeZx3q62s9YisaqMHETC8p/PQ9t78UgVdzb vLY+fHmzIYnon4Yk/yKMsGHYaxpi7A2Pc2Q8b5WC3dscXSfHcNl0bgeImai8MGhyeNMymv pXCs5baNNW43sDwqxyL5dTDQdE/kLDlbT8P5FKe1uvwrZD4KxQMQAtSiEGQvMw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=umich.edu header.s=relay-2018-08-29 header.b=eXRvkooz; dmarc=pass (policy=none) header.from=umich.edu; spf=pass (aspmx1.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: -2.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=umich.edu header.s=relay-2018-08-29 header.b=eXRvkooz; dmarc=pass (policy=none) header.from=umich.edu; spf=pass (aspmx1.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: 4E90D15379 X-Spam-Score: -2.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: jtpFZCmPlqmL hi. 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. then, if this might generally be thought useful, i wonder if this should be implemented as specifically this, or whether we might implement a callback at the appropriate point in `org-babel-tangle` asking whether or not to proceed. (then, the user's callback routine could do the comparison.) if we do "specifically this", i would suggest that this comparison be dead simple: read in the existing file's contents into some hidden buffer, and use `compare-buffer-substrings` to compare point-{min,max} of both. cheers, Greg