0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-26 11:32:53 +00:00

Merge branch 'bugfix'

This commit is contained in:
Ihor Radchenko 2022-12-21 21:44:07 +03:00
commit f731d45d28
No known key found for this signature in database
GPG key ID: 6470762A7DA11D8B

View file

@ -1051,13 +1051,17 @@ Also, remove containers associated with non-existing files."
(add-hook 'kill-emacs-hook #'org-persist-gc)))
;; Point to temp directory when `org-persist--disable-when-emacs-Q' is set.
(if (and org-persist--disable-when-emacs-Q
;; FIXME: This is relying on undocumented fact that
;; Emacs sets `user-init-file' to nil when loaded with
;; "-Q" argument.
(not user-init-file))
(setq org-persist-directory
(make-temp-file "org-persist-" 'dir)))
(when (and org-persist--disable-when-emacs-Q
;; FIXME: This is relying on undocumented fact that
;; Emacs sets `user-init-file' to nil when loaded with
;; "-Q" argument.
(not user-init-file))
(setq org-persist-directory
(make-temp-file "org-persist-" 'dir))
;; We don't need the temp directory to exist.
;; `org-persist-write-all' will refrain from creating and writing to the dir if
;; none exists yet.
(delete-directory org-persist-directory))
(add-hook 'after-init-hook #'org-persist-load-all)