From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aEsjLk0vcGbuVQEAqHPOHw:P1 (envelope-from ) for ; Mon, 17 Jun 2024 12:42:53 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id aEsjLk0vcGbuVQEAqHPOHw (envelope-from ) for ; Mon, 17 Jun 2024 14:42:53 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Xhp900Cm; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1718628173; 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=1QFndnXufPWMPL5kruJMosDwo43rBVjLfSGzZ94v18U=; b=Ash9+Mhm48z3Xeao9hSkWv8NMx66MkMq3evmLiUXFFoZP1f7UzKPoF2dzFTWTekPvtxMft +DmP23hasjsORfmBXYS4z7GDjmKdcXiaoYFm7ddMIL/qBc0AtVeTME1FxWvLF4bbcbeQB0 JfTB8qUXEqAW5zM04pS2iPTHMtKdI/nwiGkCEWiVRp++maemidYRUmBVYSZ5gBtXhtLqK2 ahiherhiEmC4HagXBtqkmEv1SY0jiXA8OszB+QwREiSq6ND1nkME+knz7IOB7+zdC0LoOt CyNs1z7IdKvclbdLVNwjL5Oi2TrDwgzy36hG2cJnkPK5VqsVaW9G+//c7IxcEg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Xhp900Cm; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1718628173; a=rsa-sha256; cv=none; b=FuuVk7QIjCaXGe1sYWQXl/K80Px5rMphkipmlpiWLNvmusIRFHxasYujogkCcLSAsJVcxD hnAaZWm8QBmrhar1mpsDT+Gtblce2IkgehsTj0GOpsbNqvaYOzc16ld3udexot7YXrT4VC edvbyJZX/ZSbmv5z5ujupU/8UZdqsIHt3SO7g6Y/K+niOu5Dxw7qhqZ+iqp6fN9qjYu7xs 6/XXyNtjSoaGLIa+DkVkWCUqtfy5iVs2aLVaSkxDGtohWeBkBjynsJvffZKxp7nkcAln/Z n8/lpPKwFBIrxFsuba7waBWIdE7X3WudJMoLrQsitekPmbs1kxBrpymff3yu0Q== 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 97E66C72C for ; Mon, 17 Jun 2024 14:42:53 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJBgI-0005ws-1j; Mon, 17 Jun 2024 08:41:54 -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 1sJBgG-0005wS-9a for emacs-orgmode@gnu.org; Mon, 17 Jun 2024 08:41:52 -0400 Received: from mail-vk1-xa34.google.com ([2607:f8b0:4864:20::a34]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJBgE-0000qK-JG; Mon, 17 Jun 2024 08:41:52 -0400 Received: by mail-vk1-xa34.google.com with SMTP id 71dfb90a1353d-4ee5662fde8so923516e0c.0; Mon, 17 Jun 2024 05:41:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718628108; x=1719232908; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1QFndnXufPWMPL5kruJMosDwo43rBVjLfSGzZ94v18U=; b=Xhp900Cmknyry40XB7ENYBd48MZSL4GQomVp5eVcXMfziJBx9RLNzKdMUUe9OCdiJC AY3G2lrjyw/FLc1eFM5f8aO2YoMM+OBLGiPQceeGrc/Kz2J71u3eGCnbPsPaLyjuqG/6 J7ow7Rfc4KuW+6KEPi4qASe7LtWGkg9VEnafB39xU4JgehqIif0WmpE7a0UNG0GsdU1m st8ojEI78fimSW02nVD9WBUOljEp6CayXpZP23t3kfmCdPX7VGJsbtVjAajgBdHtEYOL RdCMofrjTz32EfywgLUoam7Q/qGrT143/GROMqKhhBMPeoM0vtrt6mWzCXMhptL64YJX hLOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718628108; x=1719232908; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1QFndnXufPWMPL5kruJMosDwo43rBVjLfSGzZ94v18U=; b=RTZ+7TT8Umg/pKGsHRthb5yDkjHNFISx4ezL+FjHspb4p4xFUi0NGeYu/gelzAJW40 62qYu6LG6XQz85YwX5yoiO3wlOD5RXNXXIisRf/Cu3BXsg3sirUt0OuMYFfay3k+9KZo 0n2KXSZWrCk988mZigetE0dyhjEPCgVE6INDJXD/3v3Y1YvKn6XqUUmSkjBBzzRAUIDE vT34mOocMfdOwpmqUBVqbM3WZV/HK4ht3AuO3uMFNZX2z322GYIfQohuHwYGrA1g0OZZ X2yxGym3Na+BHSiodDEdsF3X/7dsCa0sAwnJZRxbZlXnPJQxEMKnpsUagN16KF+sDC/J 1nQw== X-Forwarded-Encrypted: i=1; AJvYcCXUEMV/FgsWlXLHyzlLwKHp6AQqHuP3M2hjaswldaeUFuVZAf/8QvGoLC8YEn+hbh/fboN4SHZr+osfpGM1W873eGFTFRE= X-Gm-Message-State: AOJu0YymHwheIkmYeMNs0VTod+gHWMDydiPI8QICnwOe+fNho00w0t/u nzWUbk1LvArToy+GoKuZqN5meaKOgA2lEPiWS0WLvde7sKpkRWvKk3w7kTNuqT6Zor0yZ5r7YYB hDt+xKrKDYac6XqjpB8ij5y8TNhRneSFvoNM= X-Google-Smtp-Source: AGHT+IHVInGgiXApCg1R58Bw45o5XpgAysoduSwXT4okcHiYvYpkxV5CJBweOZldW+v+KpkGJ4IQC4XWn5Y/KQY/mUk= X-Received: by 2002:a05:6122:2a0b:b0:4ed:75b:e872 with SMTP id 71dfb90a1353d-4ee3df964e1mr8160474e0c.5.1718628108509; Mon, 17 Jun 2024 05:41:48 -0700 (PDT) MIME-Version: 1.0 References: <86ed921oxu.fsf@gnu.org> <874j9vllbp.fsf@localhost> <87o781t676.fsf@localhost> In-Reply-To: <87o781t676.fsf@localhost> From: Daniel Clemente Date: Mon, 17 Jun 2024 12:41:18 +0000 Message-ID: Subject: Re: Please document the caching and its user options To: Ihor Radchenko Cc: Eli Zaretskii , emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::a34; envelope-from=n142857@gmail.com; helo=mail-vk1-xa34.google.com 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -9.69 X-Migadu-Queue-Id: 97E66C72C X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -9.69 X-TUID: Y3W+cbKDmqT2 > > In particular, when setting (setq org-element-cache-persistent nil) > > org-mode *should not* create an org-persist directory anywhere. And I > > think it shouldn't activate org-persist timers (it does now) or hooks. > > The user's preference should be respected. > > Nope. "org-persist" directory is not only used by org-element. If some > other parts of Org need to cache something, they can also store cache > there. > What's the setting then to disable org-persist? I.e. to disable creating of files like ~/.cache/org-persist/gc-lock.eld Many people seem to want to disable all creation of org-mode related files. > > That's a code change. > > If you just want to update documentation, a starting point can be > > org-element-cache-persistent's documentation, which is just "Non-nil > > when cache should persist between Emacs sessions.", and doesn't > > mention that some files will always be created even if it's nil. It > > also doesn't explicitly mention that it will create files (better be > > explicit about this), or where (or how to control where), or which > > content (i.e. just statistics, or parts of possible private org > > files). > > May you suggest an alternative docstring? > I don't know org-persist or org-element-cache-persistent so this needs your input. I can start with a template, and you can fine-tune it, expand it or rewrite it: (defvar org-element-cache-persistent t "Non-nil when Org element cache should persist between Emacs sessions. Cache files are written to disk at `org-persist-directory'. The cache will be updated regularly (as controlled by `org-element-cache-sync-idle-time') and when Emacs is closed. Persisting the cache to disk can speed up ................(startup? file opening time?, agendas? ...)...... especially if you open .......(large files? mostly unmodified files? multiple emacs instances?). It is not recommended if ........(you edit the same files from different emacs instances? if the Org files include sensitive data?).... If you use `org-crypt', note that the persisted cache may temporarily store unencrypted data after decrypting a header. Use `org-element-use-cache' instead to use a memory-only cache.") I mentioned I don't know org-element-cache-persistent, I mean that as a use= r. It's explained in developer terms (=E2=80=9Emake the cache persistent=E2=80= =9C). But as an user I don't know: is it good? will things be faster? are there risks involved? can it corrupt my files? will it leave traces of my files in other places? who should enable it? what's the downside? etc. My own experience, very subjective and it may be an edge case, is that enabling org-element-cache-persistent didn't make loading my org files faster; on the contrary, it made some things slower (including closing Emacs). > > I suggest making an explicit difference between "caching in memory" > > and "caching by storing files on disk". > > For instance: > > (defvar org-element-use-cache t > > "Non-nil when Org parser should cache its results.") > > From that description, it's not clear to a new user whether they're > > creating files on disk (as caches often do) or not. > > Do you mean something like > > "Non-nil when Org parser should cache its results. > > The cache is stored in-memory and may also be stored on disk if > `org-element-cache-persistent' is non-nil (the default)." > > ? This seems better.