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-next-visible-heading "org" (arg))
|
||||||
(declare-function org-at-heading-p "org" (&optional invisible-not-ok))
|
(declare-function org-at-heading-p "org" (&optional invisible-not-ok))
|
||||||
|
|
||||||
(defvar org-persist-directory (expand-file-name
|
|
||||||
(org-file-name-concat
|
(defgroup org-persist nil
|
||||||
(let ((cache-dir (when (fboundp 'xdg-cache-home)
|
"Persistent cache for Org mode."
|
||||||
(xdg-cache-home))))
|
:tag "Org persist"
|
||||||
(if (or (seq-empty-p cache-dir)
|
:group 'org)
|
||||||
(not (file-exists-p cache-dir))
|
|
||||||
(file-exists-p (org-file-name-concat
|
(defcustom org-persist-directory (expand-file-name
|
||||||
user-emacs-directory
|
(org-file-name-concat
|
||||||
"org-persist")))
|
(let ((cache-dir (when (fboundp 'xdg-cache-home)
|
||||||
user-emacs-directory
|
(xdg-cache-home))))
|
||||||
cache-dir))
|
(if (or (seq-empty-p cache-dir)
|
||||||
"org-persist/"))
|
(not (file-exists-p cache-dir))
|
||||||
"Directory where the data is stored.")
|
(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"
|
(defvar org-persist-index-file "index"
|
||||||
"File name used to store the data index.")
|
"File name used to store the data index.")
|
||||||
|
|
Loading…
Reference in New Issue