From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MB41BDRUpGMHRgEAbAwnHQ (envelope-from ) for ; Thu, 22 Dec 2022 13:57:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YMJIAzRUpGNDWQEAG6o9tA (envelope-from ) for ; Thu, 22 Dec 2022 13:57:24 +0100 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 78ED114E8F for ; Thu, 22 Dec 2022 13:57:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8L7l-0005Mo-K4; Thu, 22 Dec 2022 07:56:38 -0500 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 1p8L7j-0005M8-GE for emacs-orgmode@gnu.org; Thu, 22 Dec 2022 07:56:35 -0500 Received: from netyu.xyz ([152.44.41.246] helo=mail.netyu.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p8L7h-00053n-Uc for emacs-orgmode@gnu.org; Thu, 22 Dec 2022 07:56:35 -0500 Received: from fw.net.yu.netyu.xyz ( [50.224.8.147]) by netyu.xyz (OpenSMTPD) with ESMTPSA id d68984f3 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 22 Dec 2022 12:56:30 +0000 (UTC) References: <87len0uc7y.fsf@ucl.ac.uk> <87tu1ovlsn.fsf@localhost> <287345.1671683459@archlinux> User-agent: mu4e 1.8.13; emacs 30.0.50 To: Greg Minshall Cc: Ihor Radchenko , "Fraga, Eric" , emacs-orgmode@gnu.org Subject: Re: org-persist files in /tmp Date: Thu, 22 Dec 2022 06:34:21 -0600 In-reply-to: <287345.1671683459@archlinux> Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=152.44.41.246; envelope-from=ruijie@netyu.xyz; helo=mail.netyu.xyz X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, FROM_SUSPICIOUS_NTLD=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: , Reply-to: Ruijie Yu From: Ruijie Yu via "General discussions about Org-mode." 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671713843; h=from:from:sender:sender:reply-to: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; bh=CZyfr3NLFjCCaKHYbZ3kpvBq1xzUrhZfg2jUGBjcncw=; b=p0LIZP4tq6RSVulbIbwUQOgiPIFODTDQ1gQpPTbAWnJOsJHh+VGVkO9qfap0kEiozF0b/k uxUALBvbQUEjuAwHiJIdR3p237FOLYTFp4EQtPU4AgkyQNp7HK7Q0yDmnatOmSCV/WWPk6 q1RzNXLieXXCiAh6mxmxvo6l3/6aENFbO0cTV1dcZRe8HT1e3zVlWe/sUntazN8q32fa5m YGIrqjGQfTCehx/wrGy3TREBsRkh2/JGWXgYq170Nstn9zV0vbYnA1eBc+8M0g+mKyYp+u XUuKr76UK4vLFivlgd6aaKn+wEncn8Q5T4THsAnFz/BdWLb+s8Aaoaj5d4Eyug== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671713843; a=rsa-sha256; cv=none; b=I0jlu5jrDs82/AUF9QjMhFvXTfoa4SYMje4fQv4bM4VvRfirr7xxtceq/hIYbany8YSGzC QGwcj8GCCkEcSBhVeunNDaOp0qaFVpTC/g0vDvjB5TyaO48BeFcsvv5W7vY8M2N0f27B8k 2MnRIQE/3BSO4GAKUKj30g3fQTgjbu2ZU4Yuk+1lw8MxNh3S7FOgJvPrhCaxZRLhcRGzwn aD5QrMoQrx/InlF+i83LWfFSary70w1NfvpsupfZ+YtjXprnc2tWGIP9+kksl/RdPoKnzz cNIiwFq6FVPMDHg4TcnDZmfoQutqZCTtbSeXcLCR9iT0GQHmFhvVlWu6PXdU7g== X-Spam-Score: -1.80 X-Migadu-Queue-Id: 78ED114E8F Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -1.80 X-TUID: 9R1SmtFYZTe7 Greg Minshall writes: > hi, Ihor, > >> Do we need to care about cleaning up /tmp? > > my two cents is that maybe one should not care so much about cleaning up > /tmp, but i think it's worthwhile trying not to clutter it up too much. > > cheers, Greg One possible approach to this is to have all org-persist related temporary directories into an overall "$TMPDIR/org-persist" directory. That is, assuming that the parent directory exists, we create org-persist temporary directories as "$TMPDIR/org-persist/XXXXXX" and everything else would remain the same. The downside for this approach is that, since `make-tempfile' only makes a mkdir() call in its underlying function try_dir() assuming the existence of its parents [1, 2], we would probably have to create the parent via `(mkdir DIR t)' before every `make-tempfile' call within org-persist. [1] emacs/src/fileio.c [2] emacs/lib/tempname.c Best, RY