changeset 110596:415e87a42437

mail-source.el (mail-source-value): Revert previous patch. gnus-picon.el: Inhibit showing picons for top level domains. gnus-art.el (gnus-article-treat-body-boundary): Fix length computing. gnus-news.texi: Mention nnimap-inbox. nnimap.el (nnimap-request-expire-articles): Compress ranges before deletion. nnimap.el (nnimap-retrieve-headers): Don't select the group, because that's already done by nnimap-possibly-change-group. gnus-html.el (gnus-html-show-images): Fix gnus-html-display-image arguments. gnus-html.el (gnus-html-wash-images): Fix spec computing to include start/end. nnimap.el: Store the IMAP greeting, so that we can tell what kind of server we're talking to. gnus.el (gnus): Give a final warning after startup. gnus-ems.el (gnus-create-image): Ignore all image-creation errors. nndraft.el (nndraft-request-expire-articles): Fetch the expiry target for the correct group. nnmh.el (nnmh-request-expire-articles): Don't try to fetch the expiry target here, because we don't know the Gnus name of the group. nnimap.el (nnimap-get-whole-article): Remove the data that may have arrived before the FETCH data. gnus-agent.el (gnus-agent-retrieve-headers): Don't propagate `fetch-old'. gnus-agent.el (gnus-agent-read-servers-validate): Change the level for the "Ignoring disappeared server" to something low. nndoc.el (nndoc-request-list): Return success always.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Sun, 26 Sep 2010 23:01:31 +0000
parents ba4c4d4dddf5
children 05784eb30748
files doc/misc/gnus-news.texi doc/misc/gnus.texi lisp/gnus/gnus-agent.el lisp/gnus/gnus-art.el lisp/gnus/gnus-ems.el lisp/gnus/gnus-html.el lisp/gnus/gnus-picon.el lisp/gnus/gnus-util.el lisp/gnus/gnus.el lisp/gnus/nndoc.el lisp/gnus/nndraft.el lisp/gnus/nnimap.el lisp/gnus/nnmh.el
diffstat 13 files changed, 64 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/doc/misc/gnus-news.texi	Mon Sep 27 00:42:53 2010 +0200
+++ b/doc/misc/gnus-news.texi	Sun Sep 26 23:01:31 2010 +0000
@@ -68,8 +68,10 @@
 
 @item New version of @code{nnimap}
 
-@code{nnimap} has been reimplemented in a mostly-compatible way.
-@c Mention any incompatibilities.
+@code{nnimap} has been reimplemented in a mostly-compatible way.  See
+the Gnus manual for a description of the new interface.  In
+particular, @code{nnimap-inbox} and the client side split method has
+changed.
 
 @item Gnus includes the Emacs Lisp @acronym{SASL} library.
 
--- a/doc/misc/gnus.texi	Mon Sep 27 00:42:53 2010 +0200
+++ b/doc/misc/gnus.texi	Sun Sep 26 23:01:31 2010 +0000
@@ -23233,6 +23233,12 @@
 Ordered list of suffixes on picon file names to try.  Defaults to
 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
 
+@item gnus-picon-inhibit-top-level-domains
+@vindex gnus-picon-inhibit-top-level-domains
+If non-@code{nil} (which is the default), don't display picons for
+things like @samp{.net} and @samp{.de}, which aren't usually very
+interesting.
+
 @end table
 
 @node Gravatars
--- a/lisp/gnus/gnus-agent.el	Mon Sep 27 00:42:53 2010 +0200
+++ b/lisp/gnus/gnus-agent.el	Sun Sep 26 23:01:31 2010 +0000
@@ -1026,7 +1026,7 @@
                   (unless (member server gnus-agent-covered-methods)
                     (push server gnus-agent-covered-methods)
                     (setq gnus-agent-method-p-cache nil))
-                (gnus-message 1 "Ignoring disappeared server `%s'" server))))
+                (gnus-message 8 "Ignoring disappeared server `%s'" server))))
           (prog1 gnus-agent-covered-methods
             (setq gnus-agent-covered-methods nil))))
 
@@ -3752,7 +3752,7 @@
 	    (erase-buffer)
             (cond ((not (eq 'nov (let (gnus-agent) ; Turn off agent
                                    (gnus-retrieve-headers
-                                    uncached-articles group fetch-old))))
+                                    uncached-articles group))))
                    (nnvirtual-convert-headers))
                   ((eq 'nntp (car gnus-current-select-method))
                    ;; The author of gnus-get-newsgroup-headers-xover
--- a/lisp/gnus/gnus-art.el	Mon Sep 27 00:42:53 2010 +0200
+++ b/lisp/gnus/gnus-art.el	Sun Sep 26 23:01:31 2010 +0000
@@ -2301,9 +2301,9 @@
 	(insert "X-Boundary: ")
 	(gnus-add-text-properties start (point) '(invisible t intangible t))
 	(insert (let (str)
-		  (while (>= (1- (window-width)) (length str))
+		  (while (>= (window-width) (length str))
 		    (setq str (concat str gnus-body-boundary-delimiter)))
-		  (substring str 0 (1- (window-width))))
+		  (substring str 0 (window-width)))
 		"\n")
 	(gnus-put-text-property start (point) 'gnus-decoration 'header)))))
 
--- a/lisp/gnus/gnus-ems.el	Mon Sep 27 00:42:53 2010 +0200
+++ b/lisp/gnus/gnus-ems.el	Sun Sep 26 23:01:31 2010 +0000
@@ -272,7 +272,8 @@
     (when face
       (setq props (plist-put props :foreground (face-foreground face)))
       (setq props (plist-put props :background (face-background face))))
-    (apply 'create-image file type data-p props)))
+    (ignore-errors
+      (apply 'create-image file type data-p props))))
 
 (defun gnus-put-image (glyph &optional string category)
   (let ((point (point)))
--- a/lisp/gnus/gnus-html.el	Mon Sep 27 00:42:53 2010 +0200
+++ b/lisp/gnus/gnus-html.el	Sun Sep 26 23:01:31 2010 +0000
@@ -226,7 +226,7 @@
                    :keymap gnus-html-image-map
                    :button-keymap gnus-html-image-map)
                   (let ((overlay (gnus-make-overlay start end))
-                        (spec (list url alt-text)))
+                        (spec (list url start end alt-text)))
                     (gnus-overlay-put overlay 'local-map gnus-html-image-map)
                     (gnus-overlay-put overlay 'gnus-image spec)
                     (gnus-put-text-property
--- a/lisp/gnus/gnus-picon.el	Mon Sep 27 00:42:53 2010 +0200
+++ b/lisp/gnus/gnus-picon.el	Sun Sep 26 23:01:31 2010 +0000
@@ -85,6 +85,12 @@
 		 (const right))
   :group 'gnus-picon)
 
+(defcustom gnus-picon-inhibit-top-level-domains t
+  "If non-nil, don't piconify top-level domains.
+These are often not very interesting."
+  :type 'boolean
+  :group 'gnus-picon)
+
 ;;; Internal variables:
 
 (defvar gnus-picon-glyph-alist nil
@@ -188,7 +194,9 @@
 	     (setcar spec (cons (gnus-picon-create-glyph file)
 				(car spec))))
 
-	   (dotimes (i (1- (length spec)))
+	   (dotimes (i (- (length spec)
+			  (if gnus-picon-inhibit-top-level-domains
+			      2 1)))
 	     (when (setq file (gnus-picon-find-face
 			       (concat "unknown@"
 				       (mapconcat
--- a/lisp/gnus/gnus-util.el	Mon Sep 27 00:42:53 2010 +0200
+++ b/lisp/gnus/gnus-util.el	Sun Sep 26 23:01:31 2010 +0000
@@ -601,6 +601,8 @@
 		 (t
 		  (apply 'message ,format-string ,args))))))))
 
+(defvar gnus-action-message-log nil)
+
 (defun gnus-message-with-timestamp (format-string &rest args)
   "Display message with timestamp.  Arguments are the same as `message'.
 The `gnus-add-timestamp-to-message' variable controls how to add
@@ -615,14 +617,26 @@
 that take a long time, 7 - not very important messages on stuff, 9 - messages
 inside loops."
   (if (<= level gnus-verbose)
-      (if gnus-add-timestamp-to-message
-	  (apply 'gnus-message-with-timestamp args)
-	(apply 'message args))
+      (let ((message
+	     (if gnus-add-timestamp-to-message
+		 (apply 'gnus-message-with-timestamp args)
+	       (apply 'message args))))
+	(when (and (consp gnus-action-message-log)
+		   (<= level 3))
+	  (push message gnus-action-message-log))
+	message)
     ;; We have to do this format thingy here even if the result isn't
     ;; shown - the return value has to be the same as the return value
     ;; from `message'.
     (apply 'format args)))
 
+(defun gnus-final-warning ()
+  (when (and (consp gnus-action-message-log)
+	     (setq gnus-action-message-log
+		   (delete nil gnus-action-message-log)))
+    (message "Warning: %s"
+	     (mapconcat #'identity gnus-action-message-log "; "))))
+
 (defun gnus-error (level &rest args)
   "Beep an error if LEVEL is equal to or less than `gnus-verbose'.
 ARGS are passed to `message'."
--- a/lisp/gnus/gnus.el	Mon Sep 27 00:42:53 2010 +0200
+++ b/lisp/gnus/gnus.el	Sun Sep 26 23:01:31 2010 +0000
@@ -4366,7 +4366,9 @@
   (unless (byte-code-function-p (symbol-function 'gnus))
     (message "You should byte-compile Gnus")
     (sit-for 2))
-  (gnus-1 arg dont-connect slave))
+  (let ((gnus-action-message-log (list nil)))
+    (gnus-1 arg dont-connect slave)
+    (gnus-final-warning)))
 
 ;; Allow redefinition of Gnus functions.
 
--- a/lisp/gnus/nndoc.el	Mon Sep 27 00:42:53 2010 +0200
+++ b/lisp/gnus/nndoc.el	Sun Sep 26 23:01:31 2010 +0000
@@ -298,7 +298,7 @@
   t)
 
 (deffoo nndoc-request-list (&optional server)
-  nil)
+  t)
 
 (deffoo nndoc-request-newgroups (date &optional server)
   nil)
--- a/lisp/gnus/nndraft.el	Mon Sep 27 00:42:53 2010 +0200
+++ b/lisp/gnus/nndraft.el	Sun Sep 26 23:01:31 2010 +0000
@@ -222,6 +222,11 @@
 (deffoo nndraft-request-expire-articles (articles group &optional server force)
   (nndraft-possibly-change-group group)
   (let* ((nnmh-allow-delete-final t)
+	 (nnmail-expiry-target
+	  (or (gnus-group-find-parameter
+	       (gnus-group-prefixed-name "nndraft" (list 'nndraft server))
+	       'expiry-target t)
+	      nnmail-expiry-target))
 	 (res (nnoo-parent-function 'nndraft
 				    'nnmh-request-expire-articles
 				    (list articles group server force)))
--- a/lisp/gnus/nnimap.el	Mon Sep 27 00:42:53 2010 +0200
+++ b/lisp/gnus/nnimap.el	Sun Sep 26 23:01:31 2010 +0000
@@ -96,7 +96,7 @@
 
 (defstruct nnimap
   group process commands capabilities select-result newlinep server
-  last-command-time)
+  last-command-time greeting)
 
 (defvar nnimap-object nil)
 
@@ -119,7 +119,6 @@
     (erase-buffer)
     (when (nnimap-possibly-change-group group server)
       (with-current-buffer (nnimap-buffer)
-	(nnimap-send-command "SELECT %S" (utf7-encode group t))
 	(erase-buffer)
 	(nnimap-wait-for-response
 	 (nnimap-send-command
@@ -318,6 +317,9 @@
 	    (nnheader-report 'nnimap
 			     "%s" (buffer-substring
 				   (point) (line-end-position)))
+	  (setf (nnimap-greeting nnimap-object)
+		(buffer-substring (line-beginning-position)
+				  (line-end-position)))
 	  (when (eq nnimap-stream 'starttls)
 	    (nnimap-command "STARTTLS")
 	    (starttls-negotiate (nnimap-process nnimap-object)))
@@ -419,10 +421,13 @@
 	  article)))
     ;; Check that we really got an article.
     (goto-char (point-min))
-    (unless (looking-at "\\* [0-9]+ FETCH")
+    (unless (re-search-forward "\\* [0-9]+ FETCH" nil t)
       (setq result nil))
     (when result
-      (goto-char (point-min))
+      ;; Remove any data that may have arrived before the FETCH data.
+      (beginning-of-line)
+      (unless (bobp)
+	(delete-region (point-min) (point)))
       (let ((bytes (nnimap-get-length)))
 	(delete-region (line-beginning-position)
 		       (progn (forward-line 1) (point)))
@@ -626,7 +631,7 @@
     articles)
    ((and force
 	 (eq nnmail-expiry-target 'delete))
-    (unless (nnimap-delete-article articles)
+    (unless (nnimap-delete-article (gnus-compress-sequence articles))
       (message "Article marked for deletion, but not expunged."))
     nil)
    (t
@@ -640,7 +645,7 @@
       (if (null deletable-articles)
 	  articles
 	(if (eq nnmail-expiry-target 'delete)
-	    (nnimap-delete-article deletable-articles)
+	    (nnimap-delete-article (gnus-compress-sequence deletable-articles))
 	  (setq deletable-articles
 		(nnimap-process-expiry-targets
 		 deletable-articles group server)))
@@ -667,7 +672,7 @@
     ;; Change back to the current group again.
     (nnimap-possibly-change-group group server)
     (setq deleted-articles (nreverse deleted-articles))
-    (nnimap-delete-article deleted-articles)
+    (nnimap-delete-article (gnus-compress-sequence deleted-articles))
     deleted-articles))
 
 (defun nnimap-find-expired-articles (group)
--- a/lisp/gnus/nnmh.el	Mon Sep 27 00:42:53 2010 +0200
+++ b/lisp/gnus/nnmh.el	Sun Sep 26 23:01:31 2010 +0000
@@ -258,9 +258,6 @@
 					       &optional server force)
   (nnmh-possibly-change-directory newsgroup server)
   (let ((is-old t)
-	(nnmail-expiry-target
-	 (or (gnus-group-find-parameter newsgroup 'expiry-target t)
-	     nnmail-expiry-target))
 	article rest mod-time)
     (nnheader-init-server-buffer)