diff lisp/gnus/nnrss.el @ 90268:d88caeac70d7

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-2 Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (base, patch 1-3) - tag of miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-704 - Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0 (patch 700-704) - Update from CVS - Merge from gnus--rel--5.10 - Update from CVS: lisp/cus-edit.el (customize-rogue): Minor doc fix. * miles@gnu.org--gnu-2005/gnus--rel--5.10 (patch 185-186) - Merge from emacs--cvs-trunk--0 - Update from CVS
author Miles Bader <miles@gnu.org>
date Thu, 19 Jan 2006 07:11:42 +0000 (2006-01-19)
parents 6c7c654eb3c7
children 21f28d10d73a
line wrap: on
line diff
--- a/lisp/gnus/nnrss.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/gnus/nnrss.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1,6 +1,7 @@
 ;;; nnrss.el --- interfacing with RSS
 
-;; Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2004, 2005,
+;;   2006 Free Software Foundation, Inc.
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
 ;; Keywords: RSS
@@ -755,14 +756,29 @@
   "OPML subscriptions import.
 Read the file and attempt to subscribe to each Feed in the file."
   (interactive "fImport file: ")
-  (mapcar
-   (lambda (node) (gnus-group-make-rss-group
-		   (cdr (assq 'xmlUrl (cadr node)))))
+  (mapc
+   (lambda (node)
+     (let ((xmlurl (cdr (assq 'xmlUrl (cadr node)))))
+       (when (and xmlurl
+		  (not (string-match "\\`[\t ]*\\'" xmlurl))
+		  (prog1
+		      (y-or-n-p (format "Subscribe to %s " xmlurl))
+		    (message "")))
+	 (condition-case err
+	     (progn
+	       (gnus-group-make-rss-group xmlurl)
+	       (forward-line 1))
+	   (error
+	    (message
+	     "Failed to subscribe to %s (%s); type any key to continue: "
+	     xmlurl
+	     (error-message-string err))
+	    (let ((echo-keystrokes 0))
+	      (read-char)))))))
    (nnrss-find-el 'outline
-		  (progn
-		    (find-file opml-file)
-		    (xml-parse-region (point-min)
-				      (point-max))))))
+		  (mm-with-multibyte-buffer
+		    (insert-file-contents opml-file)
+		    (xml-parse-region (point-min) (point-max))))))
 
 (defun nnrss-opml-export ()
   "OPML subscription export.