From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#51335: 29.0.50; Use warnings facility for reporting Gnus errors Date: Sat, 04 Dec 2021 12:42:18 -0800 Message-ID: <87wnkkayqd.fsf@ericabrahamsen.net> References: <87sfwtxa6w.fsf@ericabrahamsen.net> <87zgqh2dce.fsf@ericabrahamsen.net> <87k0hkjd8j.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39197"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 51335@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 04 21:43:09 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtbsC-000A2G-Sk for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Dec 2021 21:43:08 +0100 Original-Received: from localhost ([::1]:34420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtbsB-0003eS-Nh for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Dec 2021 15:43:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:32996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtbs6-0003eK-JQ for bug-gnu-emacs@gnu.org; Sat, 04 Dec 2021 15:43:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43627) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtbs6-0000MR-CA for bug-gnu-emacs@gnu.org; Sat, 04 Dec 2021 15:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mtbs6-00019r-AU for bug-gnu-emacs@gnu.org; Sat, 04 Dec 2021 15:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Dec 2021 20:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51335 X-GNU-PR-Package: emacs Original-Received: via spool by 51335-submit@debbugs.gnu.org id=B51335.16386505484403 (code B ref 51335); Sat, 04 Dec 2021 20:43:02 +0000 Original-Received: (at 51335) by debbugs.gnu.org; 4 Dec 2021 20:42:28 +0000 Original-Received: from localhost ([127.0.0.1]:55173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtbrY-00018x-Gs for submit@debbugs.gnu.org; Sat, 04 Dec 2021 15:42:28 -0500 Original-Received: from mail.ericabrahamsen.net ([52.70.2.18]:53930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtbrW-00018e-Tb for 51335@debbugs.gnu.org; Sat, 04 Dec 2021 15:42:27 -0500 Original-Received: from localhost (c-71-197-232-41.hsd1.wa.comcast.net [71.197.232.41]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id E300EFF1C7; Sat, 4 Dec 2021 20:42:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1638650540; bh=aRvZv+e2c/Bp5fp2U/HVpBl9+8rlkd4CrUqyRPqPy3Y=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=WsIOQ3/lkbA/a8B6DNrOiTaC14J+ckh2Ko1EBC9jjUi5AOZLicihV5rhxw/82a8ET RQ/bH5uSCsDja9SxT4Qdhyd6wlVf26FL6LCs2401KOm3Q0r75Zpnyv8g9DY9LvwjDk 7Q/t82Uf1gx4uukWAM01UW8axgVHx/no5rQA4KM8= In-Reply-To: <87k0hkjd8j.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 07 Nov 2021 14:40:12 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:221505 Archived-At: --=-=-= Content-Type: text/plain Continuing a more piecemeal approach to this, here's a patch to change the mail source error behavior. I'm floating it for review because it involves removing a user-facing option. If this goes in, should that removal be mentioned in NEWS? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Use-gnus-error-to-report-mail-source-failures.patch >From 9d4359a72cd042a6357773c62fb70fc0c678a3cf Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Sat, 4 Dec 2021 12:37:14 -0800 Subject: [PATCH] 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 ---- lisp/gnus/mail-source.el | 19 +++++++------------ 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index a18afec02e..6ffc057ba1 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -15447,10 +15447,6 @@ Mail Source Customization 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/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el index af0a198376..efdddea69f 100644 --- a/lisp/gnus/mail-source.el +++ b/lisp/gnus/mail-source.el @@ -224,12 +224,9 @@ mail-sources (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 @@ mail-source-fetch (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)) -- 2.34.1 --=-=-=--