From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qAq8LJmUfmA7EQEAgWs5BA (envelope-from ) for ; Tue, 20 Apr 2021 10:45:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 2HNZKJmUfmDGRgAAB5/wlQ (envelope-from ) for ; Tue, 20 Apr 2021 08:45:13 +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 2F10118205 for ; Tue, 20 Apr 2021 10:45:13 +0200 (CEST) Received: from localhost ([::1]:39312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYm0N-0006IT-RW for larch@yhetil.org; Tue, 20 Apr 2021 04:45:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49780) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYlpd-0006Cx-2v for emacs-orgmode@gnu.org; Tue, 20 Apr 2021 04:34:05 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:34401) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYlpb-0006ZU-B2 for emacs-orgmode@gnu.org; Tue, 20 Apr 2021 04:34:04 -0400 Received: by mail-wr1-x42e.google.com with SMTP id r7so24675238wrm.1 for ; Tue, 20 Apr 2021 01:34:02 -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:content-transfer-encoding; bh=wdBWN4dsNrqHQljfXZDYYVZWKDYs78LEwahCTowZOzQ=; b=LCP2i1Jk+Sp7xvQxg3burkcBNdbW0WAFIdMGcQDsqNVvkl2y3TJCb/kfMr7IjRzqYQ gpoeVPwWNGEsw+XKaW+z0MuR7lNFTwzAz+F7ryrkkPwnkZp3DqMDx2JpCTnjUinTyq3y Czg3nqjRcVVzt1DuuAwRSlHNqwU59qb9oFils78DwoXbOR9omWhT+scCqFb5AWMRKUAV K5QsFnQUu0om2EeAmeYyKZ8DYFwqgI7w/5OytK25COEgtHgrm9NDNCdGYZIsr4XNAfum 776d0K3VwKpy78vYQ1kI9oCX0E/BPrCGcCWYLqvDWyspnR8vJL6KdpZ40uVP9fK6Amfl wGbQ== 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:content-transfer-encoding; bh=wdBWN4dsNrqHQljfXZDYYVZWKDYs78LEwahCTowZOzQ=; b=Fe2XaQH2g4Mzx4frXVpL2l5AY4WYzwtgQaalnr5dIA+IybuIAObluZRXrkOKU3lSHz UDnvPna4t0HbCNEihqJTDL7DP2+z86R4TaLyQjQsWQiAnOHX5ZpLQ+GOurnYAUpVOR1Q 21kWXx0SlIAc/r1m4fJft/+JIVUic9P6+w+kXQPyYiV8JxzRlCMSlIFAq1obmR5rOnJt Z0BqQsSSTAoaJfsshf/YqFTlcaPMsR/1T6OkntEC6054GX0NWY869zVppW19YzEQ298l OQxWkPBiefxfE6+vm/SaY3i9haxCAwx9SoYsJcpVjsH1bg97HB6RrnM26Q4pRBbdYuoy pQrA== X-Gm-Message-State: AOAM531y2lcLrF3we+fXUBWwKD/8x+nXjCkza7l/qNPgmAi632UJnTUF saR8jqyjt3nIuqW/VgHzihAx6tWPG2l7iWY+FfQuvvRnGMo= X-Google-Smtp-Source: ABdhPJw7t/qVyOpTgiA/keuF/q/KlqTAl+en4U4XPNhsepheEIJJ/ic1x2tjoM7/SR8hwFYW/qnMiuYMbhUkZKn0OOA= X-Received: by 2002:adf:fe4f:: with SMTP id m15mr18962761wrs.67.1618907641871; Tue, 20 Apr 2021 01:34:01 -0700 (PDT) MIME-Version: 1.0 References: <57480e77-024a-adcc-ec9a-c20b84ac762a@posteo.eu> In-Reply-To: From: Tom Gillespie Date: Tue, 20 Apr 2021 01:33:50 -0700 Message-ID: Subject: Re: [PATCH] ob-tangle.el: Speed up tangling To: sebastien.miquel@posteo.eu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=tgbugs@gmail.com; helo=mail-wr1-x42e.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: 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=1618908313; 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: 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=wdBWN4dsNrqHQljfXZDYYVZWKDYs78LEwahCTowZOzQ=; b=iPXkAU/tDZQpIqUMQV6mlBf0dnIp/CAxikHdj1JDteyiTaAVJgrEPSCwd8/OmcVMoiedrv y9gwOgOQoMOcXcHfQHCpVXJJgKp87ueKfFbe6MXSexwg2D/qpSFPY2FYiBK8HDZm63Eknh 2ikEMthq9dp72StVgj/RN3AaxL4x7zx28teVmTXLNRYV3LqEZfK5Slmi8KQflkHFVHs7bF 0e2Uw0R8i/abznCI8WOXQ0I3g2Ze40xk02ZmctTEflrxNRHU+JNADi3EL5lYfs4meOhNOC WP4sP713grxNPUmL3lP4SZGaBXv5jId13olSqDN3cqibcLJ2F/u2ri98rF6vzg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618908313; a=rsa-sha256; cv=none; b=MbwvyUrd+2SFrP3OAqr2OjFp2TAhz+0zM37o0ZvGoTyMMO3kZWg9Hdfwwd8VxI/K03uQMq Z7LsmZn0KJHOWUOIEinIr/jWttCnh+1ubf3PZe/xZi6bal39/s4HFsACWLet3NqV1JTnjV Nu6QG6GazIUR2NeL1Xo7WtIxflLKSwJc69YsNES++I2o55ijeUDUQW+pSu3s4JkKVbkPRI 46juf8gsltPJYMYzDrK+S0DP6QiAPp03pwBnQ5jcVh9j4+MD9M0s2URV17PzCgmwzYbTRf 1TCjNIN8X/Segt6NMvk+qaU9DEPP3/Gtr1rl4R8NwJynX9ZfvP2ER8a6ifNIfg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=LCP2i1Jk; 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: -3.14 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=LCP2i1Jk; dmarc=pass (policy=none) header.from=gmail.com; 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: 2F10118205 X-Spam-Score: -3.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: YJ+M2aX5l6q5 Hi S=C3=A9bastien, The temp -> rename approach is good, but you should probably use make-temp-file to create the file to reduce the risk of collisions/race conditions. For example as (make-temp-file (concat file-name ".tangling")). I think that the location of condition-case is ok, but I wonder what would happen if something were to fail before entering that? I think that only a subset of the files would be tangled, but they would all have their correct modes, so I think that that is ok. I also think that the message to the user should probably not be changed right now. While it might can be useful for debug, if someone is tangling to a large number of files then the filenames/paths are going to flood messages, so I would leave it out of this patch, and possibly submit it as another patch for a separate discussion. Best! Tom