From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61594 Path: news.gmane.org!not-for-mail From: Mark Plaksin Newsgroups: gmane.emacs.gnus.general Subject: PATCH: Make nnrss fail gracefully when it can't fetch a feed Date: Wed, 21 Dec 2005 12:57:17 -0500 Message-ID: <87y82e1gg2.fsf@stone.tss.usg.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1135188519 11123 80.91.229.2 (21 Dec 2005 18:08:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 21 Dec 2005 18:08:39 +0000 (UTC) Original-X-From: ding-owner+m10126@lists.math.uh.edu Wed Dec 21 19:08:38 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ep8Ll-0005LK-IS for ding-account@gmane.org; Wed, 21 Dec 2005 19:06:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1Ep8Ld-0004gu-00; Wed, 21 Dec 2005 12:05:57 -0600 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1Ep8IH-0004gp-00 for ding@lists.math.uh.edu; Wed, 21 Dec 2005 12:02:29 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1Ep8IE-0002K1-6a for ding@lists.math.uh.edu; Wed, 21 Dec 2005 12:02:29 -0600 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Ep8IC-0007WB-00 for ; Wed, 21 Dec 2005 19:02:24 +0100 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Ep8Ez-0002Fz-2H for ding@gnus.org; Wed, 21 Dec 2005 18:59:05 +0100 Original-Received: from stone.tss.usg.edu ([168.24.82.77]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Dec 2005 18:59:05 +0100 Original-Received: from happy by stone.tss.usg.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Dec 2005 18:59:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 33 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: stone.tss.usg.edu User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0 (gnu/linux) Cancel-Lock: sha1:CP6Pn7KkL8+idxLu239NschrmQQ= X-Spam-Score: -2.6 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61594 Archived-At: --=-=-= When nnrss can't fetch a feed an error is signalled. This patch makes nnrss print a warning instead. When you use 'g' from the Group buffer, the current behavior prevents the rest of your feeds from being checked. The root cause is the use of `(error)' in mm-url-insert-file-contents-external. This patch just adds a condition-case in nnrss.el. I don't know whether I used the right -message function. What's the difference between nnheader-message and gnus-message? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=nnrss.el --- nnrss.el.orig 2005-12-21 12:43:03.000000000 -0500 +++ nnrss.el 2005-12-21 12:43:13.000000000 -0500 @@ -380,7 +380,9 @@ ;; FIXME: shouldn't binding `coding-system-for-read' be moved ;; to `mm-url-insert'? (let ((coding-system-for-read 'binary)) - (mm-url-insert url))) + (condition-case nil + (mm-url-insert url) + (error (nnheader-message 3 "nnrss: Failed to fetch %s" url))))) (nnheader-remove-cr-followed-by-lf) ;; Decode text according to the encoding attribute. (when (setq cs (nnrss-get-encoding)) --=-=-=--