all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Karl Fogel <kfogel@red-bean.com>
Subject: [PATCH] Better error reporting in Gnus splitting.
Date: Tue, 18 Jul 2006 18:49:09 -0500	[thread overview]
Message-ID: <87d5c2jwy2.fsf@floss.red-bean.com> (raw)

Any objections if I commit this patch?

Without this patch, when splitting encounters an error (say, an
invalid regular expression) in the nnmail-split-fancy list, then the
user is simply told that there is an error, but is given no details
about the error's nature.  The mail gets split into the 'bogus' mail
group, and the user has no idea why.

With this patch, the user is informed about the general nature of the
error and may then be able to track it down.  (The error report could
theoretically be even more informative than this, but I didn't want to
make a large change.)  The mail is still filtered into 'bogus' group.

See simple patch below.

-Karl

Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/ChangeLog,v
retrieving revision 1.474
diff -u -r1.474 ChangeLog
--- ChangeLog	19 Jul 2006 01:06:00 -0000	1.474
+++ ChangeLog	19 Jul 2006 01:51:44 -0000
@@ -1,3 +1,9 @@
+2006-07-18  Karl Fogel  <kfogel@red-bean.com>
+
+	* nnmail.el (nnmail-article-group): If splitting raises an error, give
+	some information about the error when saying that the `bogus' mail
+	group will be used.
+
 2006-07-18  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>
 
 	[ Backported bug fixes from No Gnus. ]
Index: nnmail.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/nnmail.el,v
retrieving revision 1.33
diff -u -r1.33 nnmail.el
--- nnmail.el	9 Mar 2006 07:11:51 -0000	1.33
+++ nnmail.el	19 Jul 2006 01:51:45 -0000
@@ -1131,7 +1131,7 @@
 	(if (and (symbolp nnmail-split-methods)
 		 (fboundp nnmail-split-methods))
 	    (let ((split
-		   (condition-case nil
+		   (condition-case error-info
 		       ;; `nnmail-split-methods' is a function, so we
 		       ;; just call this function here and use the
 		       ;; result.
@@ -1139,7 +1139,7 @@
 			   '("bogus"))
 		     (error
 		      (nnheader-message
-		       5 "Error in `nnmail-split-methods'; using `bogus' mail group")
+		       5 "Error in `nnmail-split-methods'; using `bogus' mail group: %S" error-info)
 		      (sit-for 1)
 		      '("bogus")))))
 	      (setq split (mm-delete-duplicates split))

             reply	other threads:[~2006-07-18 23:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-18 23:49 Karl Fogel [this message]
2006-07-19  8:08 ` [PATCH] Better error reporting in Gnus splitting Reiner Steib
2006-07-19  8:14 ` Reiner Steib
2006-07-19 15:27   ` Karl Fogel
2006-07-20  2:24 ` Karl Fogel
2006-07-20  4:37   ` Miles Bader
2006-07-20 15:28   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d5c2jwy2.fsf@floss.red-bean.com \
    --to=kfogel@red-bean.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.