diff lisp/gnus/nnimap.el @ 110689:42815c76b976

Merge changes made in Gnus trunk. gnus-registry.el: Fix and extend header docs. Move the nnregistry feature check. nnimap.el (nnimap-update-info): Ignore groups that have no UIDNEXT values. nnimap.el: Implement nnimap-request-newgroups. gnus-group.el (gnus-group-completing-read): Return the symbol name, not the value from the collection. nnimap.el: Don't error out on empty non-UIDNEXT groups. nnmail.el (nnmail-article-group): Allow using the fancy split method directly. gnus.el (gnus-continuum-version): Make inactive, since it doesn't really message anything to the user. gnus-msg.el (gnus-summary-resend-message): When resending, don't externalize attachments. gnus.el (gnus-large-newsgroup): Mention gnus-large-ephemeral-newsgroup. gnus-sum.el (gnus-summary-scroll-up): Add more documentation. message.el (message-shorten-references): Comment on the number "21". mm-encode.el (mm-content-transfer-encoding-defaults): Try to make the documentation clearer. ChangeLog: jidanni -> Dan Jacobson. nnmbox.el (nnmbox-read-mbox): Mark buffer for deletion on Gnus exit. gnus-sum.el, gnus-win.el: Change the `h' command to only show the article buffer. gnus-art.el (gnus-summary-save-in-file, gnus-summary-save-in-rmail): Use with-current-buffer instead of gnus-eval-in-buffer-window to avoid popping up frames. gnus-sum.el (gnus-summary-clear-local-variables): Removed. gnus-async.el (gnus-async-delete-prefetched-entry): Remove from hash table, too. gnus-async.el: Try to keep the async hash table size reasonable. nndoc.el (nndoc-type-alist): Do babyl before mime-parts. gnus-start.el (gnus-check-bogus-newsgroups): Say how many groups we're being queried about.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Fri, 01 Oct 2010 23:08:25 +0000
parents 400dd9dfdb7b
children 0fe64d68a522
line wrap: on
line diff
--- a/lisp/gnus/nnimap.el	Fri Oct 01 22:18:24 2010 +0200
+++ b/lisp/gnus/nnimap.el	Fri Oct 01 23:08:25 2010 +0000
@@ -623,10 +623,11 @@
 		(nnimap-update-infos marks (list info)))
 	      (goto-char (point-max))
 	      (let ((uidnext (nth 5 (car marks))))
-		(setq high (if uidnext
-			       (1- uidnext)
-			     (nth 3 (car marks)))
-		      low (or (nth 4 (car marks)) uidnext)))))
+		(setq high (or (if uidnext
+                                   (1- uidnext)
+                                 (nth 3 (car marks)))
+                               0)
+		      low (or (nth 4 (car marks)) uidnext 1)))))
 	  (erase-buffer)
 	  (insert
 	   (format
@@ -912,6 +913,16 @@
 				  (or highest exists)))))))))
 	t))))
 
+(deffoo nnimap-request-newgroups (date &optional server)
+  (nnimap-possibly-change-group nil server)
+  (with-current-buffer nntp-server-buffer
+    (erase-buffer)
+    (dolist (group (with-current-buffer (nnimap-buffer)
+		     (nnimap-get-groups)))
+      (unless (assoc group nnimap-current-infos)
+	;; Insert dummy numbers here -- they don't matter.
+	(insert (format "%S 0 1 y\n" group))))))
+
 (deffoo nnimap-retrieve-group-data-early (server infos)
   (when (nnimap-possibly-change-group nil server)
     (with-current-buffer (nnimap-buffer)
@@ -990,7 +1001,9 @@
       (nnimap-update-info info (cdr (assoc group flags))))))
 
 (defun nnimap-update-info (info marks)
-  (when marks
+  (when (and marks
+	     ;; Ignore groups with no UIDNEXT values.
+	     (nth 4 marks))
     (destructuring-bind (existing flags high low uidnext start-article
 				  permanent-flags) marks
       (let ((group (gnus-info-group info))