From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id SBSnBlGtcWYbNAEAqHPOHw:P1 (envelope-from ) for ; Tue, 18 Jun 2024 15:52:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id SBSnBlGtcWYbNAEAqHPOHw (envelope-from ) for ; Tue, 18 Jun 2024 17:52:49 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="U9ymn+/J"; 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-Seal: i=1; s=key1; d=yhetil.org; t=1718725969; a=rsa-sha256; cv=none; b=JlI9XBBzVNYgvtnSrXyrBezzF+SvvmDCU7NwpohLMhHlTl0kLoh3wnNPRz8kxL/TGTvmqJ Bpjw2146h0mrIVEvs7d+rhuXa8AGW0jwZK+Dz19ls8CNDU/Uq81apdr6kB0xI2OUixvylg 3YsNGupxxPo3m8L7foTj/wFKxFu9vDYfi5zxsNhMSygDaT9V3BZVflBPlbGZE/j5R+HiXT J01/fq9IU1LmBabnbfZ5dMtXxpbYF6Cn0qBC7du3NEDSvCqJzY1pjtzdL/+6B+Fk+hxlj0 L8891wOhHYGGHRUsGYH5YvDwlQ7EiTQBe10cy9VxW3hk6NTdY3fh4DF3Jpdd4Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="U9ymn+/J"; 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=1718725969; 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=RAArhl27OPeqmAC3hZiAVtdvjQO/hsYnQsgtUhicc9o=; b=Unet+3DvCWEFcC8Gxesf54xz/j3ccHf4VeFHx7VwkVc/7u6/Z1lAy6OPeDKyULP09jNWdh qMZ7+lbMQ9Oq9wgx6YMb3MY9CeNvI4BPNd0qLI+B+yhmIxuVGLQv1uN7XK5rbGMS9vMbuQ /39CvEIitnWoxllnjNnUk4vAx7JL3YosTScYylCQd1/pyJxrIYGJ/4ZJ4Umed0xgaUM6sJ Z6/9br8hsvEgYlB7CkdkK1BB9/9pYfErg4xrOW1zc8dwuN/BA2CQEV34zUXe2RdL/fMOvn vr+YWP81zaRDdnZ24zfsh5Hs8FYrCCYATlU+4SULCQ7S2zjaaBEb/rPzHyEPpQ== 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 F3A106ABE9 for ; Tue, 18 Jun 2024 17:52:48 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJb7d-00063X-5b; Tue, 18 Jun 2024 11:51:49 -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 1sJb7Z-00062r-C5 for emacs-orgmode@gnu.org; Tue, 18 Jun 2024 11:51:45 -0400 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 1sJb7W-0005Hy-6o for emacs-orgmode@gnu.org; Tue, 18 Jun 2024 11:51:44 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 85A2F240028 for ; Tue, 18 Jun 2024 17:51:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1718725898; bh=BqTQnRDCF2UiDfv8ICS3Fnz7FR9RFxq/Egsgb/c+jv4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=U9ymn+/J+7D6rRyl1+fbOGsM29Ju9ReoHEYfesQI+RQq2lM4a4x3y9A4M1Ex3HB/j kupQiAczqzrcw2dpW+JKWi6Whj/HK1jc1ZAW/pyVuVt8SjF2wwXGTVrm17tHQh/Qms rnVnCZCFSY7DirCx0ntCNcudKShLkSuF7/CJvxL3Pf11WOzCoAO7qifV/MiSjQsz/E C3GbvEVKSdYc4wHeHXo6riNYwGFwyXT0SfQLZXVQwxF2ETpZlwJiLT9b92vZdruYdr 6nZnC09DBsTzxxDs6DoKudXFBLM3UT0fc2P2EF35ud4ARgi6H+TiXF00cT5gmrbRwS v2DrXXervFRxQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4W3WT574vvz9rxG; Tue, 18 Jun 2024 17:51:37 +0200 (CEST) From: Ihor Radchenko To: Daniel Clemente Cc: Eli Zaretskii , emacs-orgmode@gnu.org Subject: Re: Please document the caching and its user options In-Reply-To: References: <86ed921oxu.fsf@gnu.org> <874j9vllbp.fsf@localhost> <87o781t676.fsf@localhost> Date: Tue, 18 Jun 2024 15:53:18 +0000 Message-ID: <874j9qs0wh.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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=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: -9.58 X-Migadu-Scanner: mx12.migadu.com X-Spam-Score: -9.58 X-Migadu-Queue-Id: F3A106ABE9 X-TUID: wNIztWNZTAPt --=-=-= Content-Type: text/plain Daniel Clemente writes: >> 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. It is impossible. We need to store files like latex previews somewhere. This somewhere is org-persist-directory now. That said, gc-lock.eld should not be created when nothing else is actually stored in the cache. It will be fixed. >> 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:... Thanks! I am attaching tentative patch that improve the documentation. I hope that it clarifies things for you. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-org-element-cache-Improve-docstrings.patch >From 8a64e83303566bad608c386fbdafe34aa9065a2b Mon Sep 17 00:00:00 2001 Message-ID: <8a64e83303566bad608c386fbdafe34aa9065a2b.1718725818.git.yantar92@posteo.net> From: Ihor Radchenko Date: Tue, 18 Jun 2024 17:49:43 +0200 Subject: [PATCH] org-element-cache: Improve docstrings * lisp/org-element.el (org-element-use-cache): (org-element-cache-persistent): Add more details to the docstrings. Reported-by: Daniel Clemente Link: https://orgmode.org/list/CAJKAhPBUAS2bDT5k+xB2E-vu+d==yoNAfKjdKu2HC4qmB_XUnw@mail.gmail.com --- lisp/org-element.el | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index 191bb5698..631cdf20c 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -5744,10 +5744,19 @@ ;;; Cache ;;;###autoload (defvar org-element-use-cache t - "Non-nil when Org parser should cache its results.") + "Non-nil when Org parser should cache its results. +The results are cached in memory and may also be cached between Emacs +sessions if `org-element-cache-persistent' is set to non-nil.") (defvar org-element-cache-persistent t - "Non-nil when cache should persist between Emacs sessions.") + "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 when Emacs is closed or when an Org buffer +is closed. + +Persisting the cache to disk can speed up opening Org files +\\(especially large Org files). It is not recommended if the Org files +include sensitive data, unless the data is encrypted via `org-crypt'.") (defconst org-element-cache-version "2.3" "Version number for Org AST structure. -- 2.45.1 --=-=-= Content-Type: text/plain > 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). What happens if you set `org-persist--report-time' to t in your config and examine *Messages* buffer after opening/closing some Org files? Look for "org-persist:..." messages. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--