emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org d687aa1786 2/3: org-persist: Display read errors in


From: ELPA Syncer
Subject: [elpa] externals/org d687aa1786 2/3: org-persist: Display read errors in echo area
Date: Mon, 20 Jun 2022 21:57:48 -0400 (EDT)

branch: externals/org
commit d687aa1786c0c0d0b916669497006a7be70c8d1a
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    org-persist: Display read errors in echo area
    
    * lisp/org-persist.el (org-persist--read-elisp-file): Do not silently
    ignore "Invalid read syntax" error.  Report it via message.  Yet
    making the error less intrusive compared to `warn'.
---
 lisp/org-persist.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index 2d5b804468..9521f86a1b 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -303,7 +303,9 @@ FORMAT and ARGS are passed to `message'."
        ;; Remove problematic file.
        (unless (bufferp buffer-or-file) (delete-file buffer-or-file))
        ;; Do not report the known error to user.
-       (unless (string-match-p "Invalid read syntax" (error-message-string 
err))
+       (if (string-match-p "Invalid read syntax" (error-message-string err))
+           (message "Emacs reader failed to read data in %S. The error was: %S"
+                    buffer-or-file (error-message-string err))
          (warn "Emacs reader failed to read data in %S. The error was: %S"
                buffer-or-file (error-message-string err)))
        nil))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]