aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Abrahamsen2021-12-04 12:37:14 -0800
committerEric Abrahamsen2021-12-05 09:34:15 -0800
commit19307704bd6e73a6740f60459a6b5b58203b6a2f (patch)
tree66bf6eb18cac734d7c9657693462f8029b66b609
parent25dc0d1de6e7770ff1109a434965fcff5202595d (diff)
downloademacs-19307704bd6e73a6740f60459a6b5b58203b6a2f.tar.gz
emacs-19307704bd6e73a6740f60459a6b5b58203b6a2f.zip
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.
-rw-r--r--doc/misc/gnus.texi4
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/gnus/mail-source.el19
3 files changed, 11 insertions, 16 deletions
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index a18afec02e8..6ffc057ba15 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
15447files. This variable only applies when 15447files. This variable only applies when
15448@code{mail-source-delete-incoming} is a positive number. 15448@code{mail-source-delete-incoming} is a positive number.
15449 15449
15450@item mail-source-ignore-errors
15451@vindex mail-source-ignore-errors
15452If non-@code{nil}, ignore errors when reading mail from a mail source.
15453
15454@item mail-source-directory 15450@item mail-source-directory
15455@vindex mail-source-directory 15451@vindex mail-source-directory
15456Directory where incoming mail source files (if any) will be stored. The 15452Directory where incoming mail source files (if any) will be stored. The
diff --git a/etc/NEWS b/etc/NEWS
index df5e6ef7904..a8b7dc56bac 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -693,6 +693,10 @@ Emacs buffers, like indentation and the like. The new ert function
693 693
694* Incompatible Lisp Changes in Emacs 29.1 694* Incompatible Lisp Changes in Emacs 29.1
695 695
696** User option 'mail-source-ignore-errors' is now obsolete
697The whole mechanism for prompting users to continue in case of
698mail-source errors has been removed, so this option is no longer
699needed.
696** Fonts 700** Fonts
697 701
698--- 702---
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index af0a1983766..efdddea69f6 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)))))
224 (const :format "" :value :plugged) 224 (const :format "" :value :plugged)
225 (boolean :tag "Plugged")))))))) 225 (boolean :tag "Plugged"))))))))
226 226
227(defcustom mail-source-ignore-errors nil 227(make-obsolete-variable 'mail-source-ignore-errors
228 "Ignore errors when querying mail sources. 228 "configure `gnus-verbose' instead"
229If nil, the user will be prompted when an error occurs. If non-nil, 229 "29.1")
230the error will be ignored."
231 :version "22.1"
232 :type 'boolean)
233 230
234(defcustom mail-source-primary-source nil 231(defcustom mail-source-primary-source nil
235 "Primary source for incoming mail. 232 "Primary source for incoming mail.
@@ -554,18 +551,16 @@ Return the number of files that were found."
554 (condition-case err 551 (condition-case err
555 (funcall function source callback) 552 (funcall function source callback)
556 (error 553 (error
557 (if (and (not mail-source-ignore-errors) 554 (gnus-error
558 (not 555 5
559 (yes-or-no-p 556 (format "Mail source %s error (%s)"
560 (format "Mail source %s error (%s). Continue? "
561 (if (memq ':password source) 557 (if (memq ':password source)
562 (let ((s (copy-sequence source))) 558 (let ((s (copy-sequence source)))
563 (setcar (cdr (memq ':password s)) 559 (setcar (cdr (memq ':password s))
564 "********") 560 "********")
565 s) 561 s)
566 source) 562 source)
567 (cadr err))))) 563 (cadr err)))
568 (error "Cannot get new mail"))
569 0))))))))) 564 0)))))))))
570 565
571(declare-function gnus-message "gnus-util" (level &rest args)) 566(declare-function gnus-message "gnus-util" (level &rest args))