0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 20:07:46 +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
;; 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))
(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)