[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org f731d45d28: Merge branch 'bugfix'
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org f731d45d28: Merge branch 'bugfix' |
Date: |
Wed, 21 Dec 2022 13:57:57 -0500 (EST) |
branch: externals/org
commit f731d45d28627a9e3c732070e55d68e2b16bda80
Merge: 036cc05a6d e2366ac283
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
Merge branch 'bugfix'
---
lisp/org-persist.el | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index 545cf3957a..94e0afdee5 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -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)