From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id sAwXJ6qqbmbCSQEAe85BDQ:P1 (envelope-from ) for ; Sun, 16 Jun 2024 09:04:42 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id sAwXJ6qqbmbCSQEAe85BDQ (envelope-from ) for ; Sun, 16 Jun 2024 11:04:42 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=jyDvgOEo; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1718528682; 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=LoQ+SIKIG7TCjUAxPyYG7KECDhyVBm/gUD2Fmk2+vjY=; b=kmKy7JZimDYD1mbH9Ysm0c6Ky0vWa0wS5e1MxggB7+/yPDY7Fv9YgwK3EftaXaZ+kF33Us hgI7BQDKXrSu0+7eWWrd/f4f0AqiAh8CnJ2hhBRu/q87WHDJT7rw/Xd7v73kBExQ4qbxDs jPR6VtEk8gxJZaOh77avtrd9ViWFWqDlpqTVFUOdOPHB7hjtWCdHfJM9wjBdwB5Tlfs+50 SIXuKVneA3FpPb8mm2L9QnrOn9S2h6MByTpErB23DXrFCHpg4mCAb4sfsxyjciu8gbOIKc aVPgRCoHTeDWFPgPM0YLKyZNMam6JogatUyZoqjpINtui6A2BVezGQ/OffqMsA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1718528682; a=rsa-sha256; cv=none; b=j14zg/NfLOkeZEu38uzCcZx8UqM/Un9sxIizUzmmBJrKWRAAGRhw6/szDoECfz7mM1bULc +PGs2Tkm1kYmxyu2AYFzKOAfL+ujCx0qz2VTDeZs8oO6Rg8ZT5LOTUp/T4kqOTB5sPEeGA zjHy1yLJLFNh3yf4jxF+9iqtfLlubFoSO8QzkqFFzc6lFDsqqBVbf9FH3CUzc65+CYotdt a+khnD0YhHiC/RLtwyPVMTEEsH4Me3fzv86gl2HwYljvsT6DrrqG+scuKlqLybAQ5E1H3H n7RUlK88y7gQm1vP3XNEvCQ6kErzOURXBUWtSyOFdX0EYruh1jfHMNSd3IiQcQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=jyDvgOEo; dmarc=pass (policy=none) header.from=posteo.net; 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" 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 3CBBF66859 for ; Sun, 16 Jun 2024 11:04:42 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sIlnK-0008K7-6K; Sun, 16 Jun 2024 05:03:26 -0400 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 1sIlnI-0008JQ-8o for emacs-orgmode@gnu.org; Sun, 16 Jun 2024 05:03:24 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sIlnF-0006Ga-P7 for emacs-orgmode@gnu.org; Sun, 16 Jun 2024 05:03:23 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 1908C240101 for ; Sun, 16 Jun 2024 11:03:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1718528599; bh=XuE/1SM0DU1OU6zFutfDLRE0izr/ZFVRP71dB7z6t+0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=jyDvgOEoCb3/dCybbbLSv+e9S3TFCLOEo895TUdZD3m9lt/6vhLTH4slQIbPV3GGj DtOaeCQNoe2yOTTV+4slwGeCrhZI1/i3ZnILhM9XeQgoOSeckjRzvb1bUFsJrk0eD1 5ti+0BU3PROXfDFCOPm4sLsOHHYgN7dgYsivjED5/tbpVFmRexSjfnU7loKUo5+7yp XiRE2vKdV/Dp0Q8vRhlCUZlxOGB+ukLbYfVFZ7juwyBp0CAzBqTjkhpuBhS2OkYfJh XKDlOsVDujBAu8zjhhX+5NK8eXLmECsnNlYRg3PGgoyQbXwBFMW5LZgkK9Z05nVrs2 CKFQgYqrljZ5w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4W26Vs6FcJz6tw1; Sun, 16 Jun 2024 11:03:17 +0200 (CEST) From: Ihor Radchenko To: Eli Zaretskii Cc: emacs-orgmode@gnu.org, emacs-devel@gnu.org, michael.albinus@gmx.de Subject: Re: Please document the caching and its user options In-Reply-To: <86cyoitgox.fsf@gnu.org> References: <86ed921oxu.fsf@gnu.org> <874j9vllbp.fsf@localhost> <86a5jny72y.fsf@gnu.org> <877cerk0bz.fsf@localhost> <861q4zy0va.fsf@gnu.org> <87y176gyou.fsf@localhost> <86msnmtl5o.fsf@gnu.org> <87a5jmguq8.fsf@localhost> <86cyoitgox.fsf@gnu.org> Date: Sun, 16 Jun 2024 09:05:02 +0000 Message-ID: <87h6dti7gh.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.57 X-Spam-Score: -6.57 X-Migadu-Queue-Id: 3CBBF66859 X-Migadu-Scanner: mx11.migadu.com X-TUID: cJgXVpVJJsuE Eli Zaretskii writes: >> I was referring to some kind of global option that defines cache >> directory, data directory, etc. Something akin XDG. > > We already have xdg-cache-home (and a few others in xdg.el). Is that > what you meant? Yes, except that `xdg-cache-home' is limited: 1. It cannot be customized by users 2. It may sometimes return nil 3. It is limited to XDG - not all the Emacs platforms What I had in mind is a new custom option for cache dir (defaulting to OS-specific cache like XDG on Linux or something equivalent on Windows) + a new API function like `system-cache-home' that will be guaranteed to return some kind of meaningful dir. >> Also, caching is not as simple, because caches may contain sensitive >> data. (see >> https://list.orgmode.org/orgmode/CAM9ALR8fuSu0YWS1SehRw7sYxprJFX-r2juXd_DgvCYVKQc95Q@mail.gmail.com/) >> Some users may want to move caches to read-restricted location >> or even to location dependent on where the cache is originating from >> (separate caches depending on whether default-directory is from >> encrypted volume, remote mount, etc) > > AFAIK, Emacs has APIs for at least some of that, but whether to use > them is up to the application, I think. What are those APIs? >> Finally, we got several requests to have caches cleared up upon exiting >> Emacs, which is also something that should be better managed centrally, >> by Emacs, for all possible kinds of cache/history data. > > Deleting files in a directory, recursively if needed, is already > available. is that what you meant? No. I mean a new user option like `clear-caches-on-exit' that will work across all the packages. Then, concerned users may set it to non-nil to delete *all* the caches upon exiting Emacs. Having to set this for each specific package (with some packages not documenting that they use cache, or users not expecting that cache may be used and not reading _all_ the docs carefully enough) is not ideal, IMHO. > Can we first fix the problems for which I started this thread? The > more general issues should be subjects of separate discussions, IMO. If there is a global Emacs-wide customization how to handle caches, there will be no need to document it in Org mode manual. So, I would like to see if introducing such global customization is feasible before making non-trivial changes to Org manual. (I am not even sure where to document these things in the manual yet; they seem way too generic wrt Org mode's scope) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at