emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org eeb0450 26/29: Use XDG cache dir as default dir for


From: ELPA Syncer
Subject: [elpa] externals/org eeb0450 26/29: Use XDG cache dir as default dir for cache persistance
Date: Sun, 17 Oct 2021 02:57:31 -0400 (EDT)

branch: externals/org
commit eeb04504ef0924a8c0d054d8a74043dd42fe9ffd
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    Use XDG cache dir as default dir for cache persistance
    
    * lisp/org-persist.el (org-persist-path): Change default dir to XDG
    cache dir and fall back to `user-emacs-directory' as the last resort.
---
 lisp/org-persist.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index 2b0abcf..6c054c2 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -29,12 +29,18 @@
 
 (require 'org-compat)
 (require 'org-id)
+(require 'xdg)
 
 (declare-function org-back-to-heading "org" (&optional invisible-ok))
 (declare-function org-next-visible-heading "org" (arg))
 (declare-function org-at-heading-p "org" (&optional invisible-not-ok))
 
-(defvar org-persist-path (org-file-name-concat user-emacs-directory 
"org-persist/")
+(defvar org-persist-path (org-file-name-concat
+               (let ((cache-dir (xdg-cache-home)))
+                 (if (seq-empty-p cache-dir)
+                     user-emacs-directory
+                   cache-dir))
+               "org-persist/")
   "Directory where the data is stored.")
 
 (defvar org-persist-index-file "index"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]