[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 350fa06 1/2: org-persist.el/org-persist--get-index:
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 350fa06 1/2: org-persist.el/org-persist--get-index: Do not show warning |
Date: |
Wed, 20 Oct 2021 02:57:27 -0400 (EDT) |
branch: externals/org
commit 350fa065b45e033d9b1b8d59b01ab3d87cc7aed3
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
org-persist.el/org-persist--get-index: Do not show warning
* lisp/org-persist.el (org-persist--read-index): Disable warning when
`org-persist-index-file' does not exist. The warning would spam the
users with disabled cache persistance unnecessarily.
Link: https://list.orgmode.org/87o87kb64s.fsf@yandex.com/T/#u
---
lisp/org-persist.el | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index b017be1..93fbb8d 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -104,12 +104,10 @@ When BUFFER is nil, return plist for global VAR."
(defun org-persist--read-index ()
"Read `org-persist--index'"
(unless org-persist--index
- (if (file-exists-p (org-file-name-concat org-persist-directory
org-persist-index-file))
- (with-temp-buffer
- (insert-file-contents (org-file-name-concat org-persist-directory
org-persist-index-file))
- (setq org-persist--index (read (current-buffer))))
- (warn "Cannot read org-persist index from %s."
- (org-file-name-concat org-persist-directory
org-persist-index-file)))))
+ (when (file-exists-p (org-file-name-concat org-persist-directory
org-persist-index-file))
+ (with-temp-buffer
+ (insert-file-contents (org-file-name-concat org-persist-directory
org-persist-index-file))
+ (setq org-persist--index (read (current-buffer)))))))
(cl-defun org-persist-register (var &optional buffer &key inherit)
"Register VAR in BUFFER to be persistent.