On 29.07.25 21:58, Ihor Radchenko wrote:
Andreas Röhler<andreas.roeh...@easy-emacs.de> writes:

seehttps://list.orgmode.org/orgmode/1158097067.265983.1670026787...@mail1.libero.it/

Okay, thanks, seems an old issue. But the missing user-option isn't
introduced yet.

As I'm not the only one complaining this, maybe fix it?
Please check the thread. It is not possible to disable org-persist

This might be a fix here:

diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index a639699d9..21a5c54d9 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -1354,13 +1354,16 @@ such scenario."
   (setq org-persist-directory
         (make-temp-file "org-persist-" 'dir)))

+
+
 ;; Automatically write the data, but only when we have write access.
 (when (org-persist--check-write-access org-persist-directory)
+  (unless (string= "root" (getenv "USER"))
     (add-hook 'kill-emacs-hook #'org-persist-clear-storage-maybe) ; Run last.
     (add-hook 'kill-emacs-hook #'org-persist-write-all)
     ;; `org-persist-gc' should run before `org-persist-write-all'.
     ;; So we are adding the hook after `org-persist-write-all'.
-  (add-hook 'kill-emacs-hook #'org-persist-gc))
+    (add-hook 'kill-emacs-hook #'org-persist-gc)))

 (add-hook 'after-init-hook #'org-persist-load-all)

#####

The issue occurred at NixOS when running Emacs as root in order to edit configuration.nix.

Didn't start as ‘emacs -Q’, because want the convenience when editing.

Then root-Emacs interfered with the user-space, leaving it like this

  /home/MySelf/.cache/org-persist:
  drwxr-xr-x 23 MySelf users 4096 29. Jul 16:04 ..
  drwxr-xr-x  2 MySelf users 4096 30. Jul 09:40 d9
  drwxr-xr-x  2 MySelf users 4096 30. Jul 09:40 f4
  drwxr-xr-x  2 MySelf users 4096 30. Jul 09:40 ac
  -rw-------  1 root  root  1217 30. Jul 09:46 index.eld
  drwxr-xr-x  2 root  root  4096 30. Jul 09:46 a5
  drwxr-xr-x  6 MySelf users 4096 30. Jul 09:46 .

Now root owns index.eld, a new Emacs instance starts with an error:

Debugger entered--Lisp error: (permission-denied "Opening input file" "Permission denied" "/home/MySelf/.cache/org-persist/index.eld")
insert-file-contents("/home/MySelf/.cache/org-persist/index.eld")
org-persist--read-elisp-file("/home/MySelf/.cache/org-persist/index.eld")
  org-persist-read:index((index "3.2") "/home/MySelf/.cache/org-persist/index.eld" nil)   org-persist-load:index((index "3.2") "/home/MySelf/.cache/org-persist/index.eld" nil)
  org-persist--load-index()
  org-persist-register(((elisp org-element--cache) (version "2.3")) #<buffer tage.org>)
  org-element-cache-reset(all)
  org-element-update-syntax()
  org-link-set-parameters("w3m" :store org-w3m-store-link)
  byte-code("\300\301!\210\302 \303\232\204\20\0\304\305\306\"\210\300\307!\210\310\311\312\313#\207" [require org-macs org-release "9.8-pre" warn "Org version mismatch.\nThis warning usually appears when a built-in Org version is loaded\nprior to the more recent Org version.\n\nVersion mismatch is commonly encountered in the following situations:\n\n1. Emacs is loaded using literate Org config and more recent Org\n   version is loaded inside the file loaded by `org-babel-load-file'.\n   `org-babel-load-file' triggers the built-in Org version clashing\n   the newer Org version attempt to be loaded later.\n\n   It is recommended to move the Org loading code before the\n   `org-babel-load-file' call.\n\n2. New Org version is loaded manually by setting `load-path', but some\n   other package depending on Org is loaded before the `load-path' is\n   configured.\n   This \"other package\" is triggering built-in Org version, again\n   causing the version mismatch.\n\n   It is recommended to set `load-path' as early in the config as\n   possible.\n\n3. New Org version is loaded using straight.el package manager and\n   other package depending on Org is loaded before straight triggers\n   loading of the newer Org version.\n\n   It is recommended to put\n\n %s\n\n   early in the config.  Ideally, right after the straight.el\n   bootstrap.  Moving `use-package' :straight declaration may not be\n   sufficient if the corresponding `use-package' statement is\n   deferring the loading.\n\n4. A new Org version is synchronized with Emacs git repository and\n stale .elc files are still left from the previous build.\n\n   It is recommended to remove .elc files from lisp/org directory and\n   re-compile." "(straight-use-package 'org)" ol org-link-set-parameters "w3m" :store org-w3m-store-link] 4)
  require(ol-w3m)
  org-load-modules-maybe()
  org-mode()
  set-auto-mode-0(org-mode nil)
[...]

fully. In that thread, I did as much as possible to address the request.

Thanks for all our care,

Andreas

Reply via email to