From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.devel,gmane.emacs.orgmode Subject: Re: Please document the caching and its user options Date: Sun, 16 Jun 2024 09:05:02 +0000 Message-ID: <87h6dti7gh.fsf@localhost> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17956"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-orgmode@gnu.org, emacs-devel@gnu.org, michael.albinus@gmx.de To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 16 11:04:24 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sIloG-0004Um-Jw for ged-emacs-devel@m.gmane-mx.org; Sun, 16 Jun 2024 11:04:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sIlnJ-0008Jq-Pb; Sun, 16 Jun 2024 05:03:25 -0400 Original-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-0008JR-6i for emacs-devel@gnu.org; Sun, 16 Jun 2024 05:03:24 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sIlnG-0006Gb-2I for emacs-devel@gnu.org; Sun, 16 Jun 2024 05:03:23 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id EA710240027 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== Original-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) In-Reply-To: <86cyoitgox.fsf@gnu.org> Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320185 gmane.emacs.orgmode:162090 Archived-At: 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