[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nnimap 0.3.20 released



Bugfixes.

The UIDNEXT fix is broken (it doesn't handle > 28 bit integers, but I
don't think Gnus does either) but it's better than not being able to
copy article into a nnimap group anyway.

Get it from http://vic20.dzp.se/gnus-imap/nnimap.tar.gz

/s

1998-08-12 22:59:05  Simon Josefsson  <jas@pdc.kth.se>

	* nnimap 0.3.20 released

1998-08-12 22:57:38  Simon Josefsson  <jas@pdc.kth.se>

	* nnimap.el (nnimap-request-accept-article): UIDNEXT is now a
	string, convert it

	* nnimap.el (nnimap-request-list-mapper): informational message
	about what we are doing

1998-08-12 22:16:15  Simon Josefsson  <jas@pdc.kth.se>

	* nnimap.el (nnimap-body-lines): new function
	(nnimap-retrieve-headers): use it

diff -u nnimap-0.3.19/nnimap.el nnimap-0.3.20/nnimap.el
--- nnimap-0.3.19/nnimap.el	Wed Aug 12 15:26:23 1998
+++ nnimap-0.3.20/nnimap.el	Wed Aug 12 22:58:55 1998
@@ -54,8 +54,8 @@
 ;;;   o Figure out when update-info is called and why and if we need to
 ;;;     call it more often and from where.
 ;;;   o Add update-info calls? To request-group, close-group, retrieve-groups
+;;;   o Tell Gnus about new groups (how can we tell?)
 ;;;   o Add asynchronous support with two server connections (use BODY.PEEK)
-;;;   o Local storage article caching
 ;;;   o Add support for the following: (if applicable)
 
 ;;;       request-list-newsgroups, request-regenerate
@@ -70,8 +70,7 @@
 ;;;   o ACAP stuff (perhaps a different project, would be nice to ACAPify 
 ;;;     .newsrc.eld)
 ;;;   o MIME
-;;;   o Disconnected support (I haven't a clue about the Gnus Agent thing,
-;;;     but IMAP has very good disconnected support)
+;;;   o Fix the flag situation when using the Gnus Agent
 ;;;   o Support RFC2221 (Login referrals)
 ;;;   o Support RFC2195 (MD5 logins -- use Gareth Rees's library?)
 ;;;   o IMAP2BIS compatibility (RFC2061)
@@ -93,7 +92,7 @@
 
 (nnoo-declare nnimap) ; we derive from no one
 
-(defconst nnimap-version "nnimap 0.3.19")
+(defconst nnimap-version "nnimap 0.3.20")
 
 (defvoo nnimap-list-pattern "*" 
 "*PATTERN or list of PATTERNS use to limit available groups.  
@@ -291,6 +290,17 @@
 (nnoo-define-basics nnimap)
 
 ;; todo:
+;; handle "MESSAGE" too
+(defun nnimap-body-lines (body)
+  (if (listp body)
+      (if (and (stringp (car body))
+	       (string= (car body) "TEXT")
+	       (numberp (nth 7 body)))
+	  (nth 7 body)
+      (apply '+ (mapcar 'nnimap-body-lines body)))
+    0))
+
+;; todo:
 ;; use NOV lines instead? A fetch like
 ;;   (UID RFC822.SIZE BODY BODY[HEADER.FIELDS (References)]) would do it
 ;; remove redundant lines:/chars:
@@ -314,19 +324,10 @@
                                     (nnimap-range-to-string compressed))
                                   " (UID RFC822.HEADER RFC822.SIZE BODY)")))
           (mapc (lambda (num)
-                  (let ((header (imap-message-get num 'RFC822.HEADER))
-			(size   (imap-message-get num 'RFC822.SIZE))
-			(body   (imap-message-get num 'BODY))
-			(lines  0))
-		    (mapcar (lambda (mime-imb)
-			      (if (and (listp mime-imb)
-				       (string= (car mime-imb) "TEXT"))
-				  (let ((len (nth 7 mime-imb)))
-				    (if (numberp len)
-					(setq lines (+ lines len))))))
-			    body)
-		    (if (numberp (nth 7 body))
-			(setq lines (+ lines (nth 7 body))))
+                  (let* ((header (imap-message-get num 'RFC822.HEADER))
+			 (size   (imap-message-get num 'RFC822.SIZE))
+			 (body   (imap-message-get num 'BODY))
+			 (lines  (nnimap-body-lines body)))
                     (with-current-buffer nntp-server-buffer
                       (if (not header)
                           (insert "423 Bad article number.\n")
@@ -546,6 +547,7 @@
 	      ;; We ignore groups with spaces (Gnus can't handle them)
 	      (string-match " " (symbol-name sym)))
     (let ((group (symbol-name sym)) high)
+      (gnus-message 7 "Generating active list, group %s" group)
       (cond 
        ((eq nnimap-group-list-speed 'slow)
 	(when (nnimap-possibly-change-group group nil)
@@ -603,7 +605,7 @@
                         (concat nnimap-list-method " "
                                 (car pattern) " "
                                 (cdr pattern)))))
-        (gnus-message 8 "Generating active list for %s" server)
+        (gnus-message 5 "Generating active list for %s" server)
         (mapatoms 'nnimap-request-list-mapper imap-data-folder)))
     (setq nnimap-group-alist (nnmail-get-active))
     t))
@@ -643,7 +645,7 @@
 (deffoo nnimap-request-update-info (group info &optional server)
   (when (nnimap-possibly-change-group group server) ;; SELECT
     (with-current-buffer nnimap-server-buffer
-      (gnus-message 9 "Updating active info for mailbox %s" group)
+      (gnus-message 5 "Updating active info for mailbox %s" group)
 
       ;; extend info to have parameters (otherwise when we set them, 
       ;; they don't get set)
@@ -910,7 +912,8 @@
 		    ;; Optional flags,date???
 		    (list (format "APPEND %s " group) (current-buffer))
 		    nnimap-server-buffer))
-      (let ((high (imap-folder-get 'UIDNEXT group nnimap-server-buffer)))
+      (let ((high (string-to-number 
+		   (imap-folder-get 'UIDNEXT group nnimap-server-buffer))))
 	(when high
 	  (cons group high))))))
 
diff -u nnimap-0.3.19/ChangeLog nnimap-0.3.20/ChangeLog
--- nnimap-0.3.19/ChangeLog	Wed Aug 12 15:31:50 1998
+++ nnimap-0.3.20/ChangeLog	Wed Aug 12 22:59:09 1998
@@ -1,3 +1,20 @@
+1998-08-12 22:59:05  Simon Josefsson  <jas@pdc.kth.se>
+
+	* nnimap 0.3.20 released
+
+1998-08-12 22:57:38  Simon Josefsson  <jas@pdc.kth.se>
+
+	* nnimap.el (nnimap-request-accept-article): UIDNEXT is now a
+	string, convert it
+
+	* nnimap.el (nnimap-request-list-mapper): informational message
+	about what we are doing
+
+1998-08-12 22:16:15  Simon Josefsson  <jas@pdc.kth.se>
+
+	* nnimap.el (nnimap-body-lines): new function
+	(nnimap-retrieve-headers): use it
+
 1998-08-12 15:31:46  Simon Josefsson  <jas@pdc.kth.se>
 
 	* nnimap 0.3.19 released