mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-24 07:20:29 +00:00
org-persist.el: Make org-persist-directory a custom variable
* lisp/org-persist.el (org-persist): Create org-persist customisation group. (org-persist-directory): Convert into defcustom.
This commit is contained in:
parent
79f89dd8aa
commit
344b99070f
@ -35,19 +35,27 @@
|
||||
(declare-function org-next-visible-heading "org" (arg))
|
||||
(declare-function org-at-heading-p "org" (&optional invisible-not-ok))
|
||||
|
||||
(defvar org-persist-directory (expand-file-name
|
||||
(org-file-name-concat
|
||||
(let ((cache-dir (when (fboundp 'xdg-cache-home)
|
||||
(xdg-cache-home))))
|
||||
(if (or (seq-empty-p cache-dir)
|
||||
(not (file-exists-p cache-dir))
|
||||
(file-exists-p (org-file-name-concat
|
||||
user-emacs-directory
|
||||
"org-persist")))
|
||||
user-emacs-directory
|
||||
cache-dir))
|
||||
"org-persist/"))
|
||||
"Directory where the data is stored.")
|
||||
|
||||
(defgroup org-persist nil
|
||||
"Persistent cache for Org mode."
|
||||
:tag "Org persist"
|
||||
:group 'org)
|
||||
|
||||
(defcustom org-persist-directory (expand-file-name
|
||||
(org-file-name-concat
|
||||
(let ((cache-dir (when (fboundp 'xdg-cache-home)
|
||||
(xdg-cache-home))))
|
||||
(if (or (seq-empty-p cache-dir)
|
||||
(not (file-exists-p cache-dir))
|
||||
(file-exists-p (org-file-name-concat
|
||||
user-emacs-directory
|
||||
"org-persist")))
|
||||
user-emacs-directory
|
||||
cache-dir))
|
||||
"org-persist/"))
|
||||
"Directory where the data is stored."
|
||||
:group 'org-persist
|
||||
:type 'directory)
|
||||
|
||||
(defvar org-persist-index-file "index"
|
||||
"File name used to store the data index.")
|
||||
|
Loading…
Reference in New Issue
Block a user