1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-22 07:09:47 +00:00

org-persist-read: Do not raise warning on known read error

This commit is contained in:
Ihor Radchenko 2021-11-01 20:47:11 +08:00
parent 6621ee32e4
commit 7a6f48ab4a
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B

View File

@ -249,8 +249,10 @@ When BUFFER is `all', unregister VAR in all buffers."
(condition-case err
(setq data (read (current-buffer)))
(error
(warn "Emacs reader failed to read data for %S:%S. The error was: %S"
(or buffer "global") var (error-message-string err))
;; Do not report the known error to user.
(unless (string-match-p "Invalid read syntax" (error-message-string err))
(warn "Emacs reader failed to read data for %S:%S. The error was: %S"
(or buffer "global") var (error-message-string err)))
(setq data nil))))
(with-current-buffer (or buffer (current-buffer))
(cl-loop for var1 in (plist-get index :variable)