[Top][All Lists]

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

master 1930770: Use gnus-error to report mail-source failures

From: Eric Abrahamsen
Subject: master 1930770: Use gnus-error to report mail-source failures
Date: Sun, 5 Dec 2021 12:34:27 -0500 (EST)

branch: master
commit 19307704bd6e73a6740f60459a6b5b58203b6a2f
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    Use gnus-error to report mail-source failures
    * 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       |  4 ----
 etc/NEWS                 |  4 ++++
 lisp/gnus/mail-source.el | 19 +++++++------------
 3 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index a18afec..6ffc057 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -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
diff --git a/etc/NEWS b/etc/NEWS
index df5e6ef..a8b7dc5 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -693,6 +693,10 @@ Emacs buffers, like indentation and the like.  The new ert 
 * 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
 ** Fonts
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index af0a198..efdddea 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -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)
-                   (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))
-                                      (cadr err)))))
-                     (error "Cannot get new mail"))
+                                      (cadr err)))
 (declare-function gnus-message "gnus-util" (level &rest args))

reply via email to

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