]> git.eshelyaron.com Git - emacs.git/commitdiff
Use gnus-error to report mail-source failures
authorEric Abrahamsen <eric@ericabrahamsen.net>
Sat, 4 Dec 2021 20:37:14 +0000 (12:37 -0800)
committerEric Abrahamsen <eric@ericabrahamsen.net>
Sun, 5 Dec 2021 17:34:15 +0000 (09:34 -0800)
* lisp/gnus/mail-source.el (mail-source-fetch): Instead of querying
the user on mail sources errors -- in effect asking "do you want to
continue, or halt the process?" -- log the error with `gnus-error',
severity 5. The query didn't provide any meaningful control; error
reporting is all that's needed.
(mail-source-ignore-errors): Obsolete this option; users can see the
error or not by configuring `gnus-verbose'.
* doc/misc/gnus.texi (Mail Source Customization): Remove mention of
the above option from the manual.

doc/misc/gnus.texi
etc/NEWS
lisp/gnus/mail-source.el

index a18afec02e8c11fad56a0d94c20e58411b850ce6..6ffc057ba15d5182ed4ed57d74b1016bde2918cf 100644 (file)
@@ -15447,10 +15447,6 @@ If non-@code{nil}, ask for confirmation before deleting old incoming
 files.  This variable only applies when
 @code{mail-source-delete-incoming} is a positive number.
 
-@item mail-source-ignore-errors
-@vindex mail-source-ignore-errors
-If non-@code{nil}, ignore errors when reading mail from a mail source.
-
 @item mail-source-directory
 @vindex mail-source-directory
 Directory where incoming mail source files (if any) will be stored.  The
index df5e6ef7904d863142f906f08040442adb59ad2a..a8b7dc56bacb2f74a072b1a9e285acb1e0cc78bf 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -693,6 +693,10 @@ Emacs buffers, like indentation and the like.  The new ert function
 \f
 * Incompatible Lisp Changes in Emacs 29.1
 
+** User option 'mail-source-ignore-errors' is now obsolete
+The whole mechanism for prompting users to continue in case of
+mail-source errors has been removed, so this option is no longer
+needed.
 ** Fonts
 
 ---
index af0a198376693de9936f7edac73c58a8d299178d..efdddea69f614e5fc34d45485592a9faf01ba19a 100644 (file)
@@ -224,12 +224,9 @@ Leave mails for this many days" :value 14)))))
                                           (const :format "" :value :plugged)
                                           (boolean :tag "Plugged"))))))))
 
-(defcustom mail-source-ignore-errors nil
-  "Ignore errors when querying mail sources.
-If nil, the user will be prompted when an error occurs.  If non-nil,
-the error will be ignored."
-  :version "22.1"
-  :type 'boolean)
+(make-obsolete-variable 'mail-source-ignore-errors
+                        "configure `gnus-verbose' instead"
+                        "29.1")
 
 (defcustom mail-source-primary-source nil
   "Primary source for incoming mail.
@@ -554,18 +551,16 @@ Return the number of files that were found."
                 (condition-case err
                     (funcall function source callback)
                   (error
-                   (if (and (not mail-source-ignore-errors)
-                            (not
-                             (yes-or-no-p
-                              (format "Mail source %s error (%s).  Continue? "
+                    (gnus-error
+                     5
+                     (format "Mail source %s error (%s)"
                                       (if (memq ':password source)
                                           (let ((s (copy-sequence source)))
                                             (setcar (cdr (memq ':password s))
                                                     "********")
                                             s)
                                         source)
-                                      (cadr err)))))
-                     (error "Cannot get new mail"))
+                                      (cadr err)))
                    0)))))))))
 
 (declare-function gnus-message "gnus-util" (level &rest args))