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

nnimap 0.3.22 released



Bugfixes.

'respool capability put back in because gnus-summary-article-move and
possibly other functions needs it. I'm not quite sure what the
'respool capability really means, and if Gnus is broken when assuming
only nnmail backends has this capability. I've added to the known-bugs
list that gnus-summary-respool-* does not work.

We have been doing EXPUNGE:es ever since day 1 -- the CLOSE command
does a silent EXPUNGE. Oops.

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

/s

1998-08-15 15:31:09  Simon Josefsson  <jas@pdc.kth.se>

	* nnimap 0.3.22 released

1998-08-15 15:26:33  Simon Josefsson  <jas@pdc.kth.se>

	* Makefile: hmac and tar targets

1998-08-15 14:54:55  Simon Josefsson  <jas@pdc.kth.se>

	* nnimap.el (nnimap-split-articles): close mailbox

1998-08-15 14:51:27  Simon Josefsson  <jas@pdc.kth.se>

	* nnimap.el: 'respool in gnus-declare-backend required for
	gnus-summary-article-move.

1998-08-12  Jim Radford  <radford@robby.caltech.edu>

        * nnimap.el (nnimap-possibly-change-group): Fixed emphemeral
        support by passing normally qualifed name for `gnus-ephemeral-p'.

1998-08-13  Jim Radford  <radford@robby.caltech.edu>

        * nnimap.el (nnimap-request-list): 
        * nnimap.el (nnimap-retrieve-groups): nnimap-request-list now default
        to 'fast and lets nnimap-retrieve-groups return real data.

        * nnimap.el (nnimap-close-group):
        * nnimap.el (nnimap-request-update-info):
        * nnimap.el (nnimap-flag-permanent-p):
        * imap4rev1.el (imap-cb-response): permanentflags are now strings
        so we don't have to convert every time.

1998-08-15 14:42:04  Simon Josefsson  <jas@pdc.kth.se>

	* nnimap.el (nnimap-close-group): don't use evil CLOSE, use
	UNSELECT or EXAMINE+CLOSE

diff -u nnimap-0.3.21/Makefile nnimap-0.3.22/Makefile
--- nnimap-0.3.21/Makefile	Thu Aug 13 15:44:12 1998
+++ nnimap-0.3.22/Makefile	Sat Aug 15 16:07:49 1998
@@ -1,12 +1,20 @@
-EMACS = emacs
+EMACS=emacs
+VERSION=`date +%y%m%d-%H%M`
 
-all: imap4rev1.elc nnimap.elc
+all: imap4rev1.elc nnimap.elc hmac.elc
+
+hmac.elc: hmac.el
+	$(EMACS) -batch -q -no-site-file -f batch-byte-compile hmac.el
 
 imap4rev1.elc: imap4rev1.el
 	$(EMACS) -batch -q -no-site-file -f batch-byte-compile imap4rev1.el
 
-nnimap.elc: imap4rev1.elc nnimap.el
+nnimap.elc: imap4rev1.elc hmac.el nnimap.el
 	$(EMACS) -batch -q -no-site-file -l imap4rev1.el -f batch-byte-compile nnimap.el
 
 clean:
-	rm -f imap4rev1.elc nnimap.elc
+	rm -f imap4rev1.elc nnimap.elc hmac.elc
+
+tar:
+	cvs export -D now -d nnimap-$(VERSION) nnimap
+	tar cvfz nnimap-$(VERSION).tar.gz nnimap-$(VERSION)
diff -u nnimap-0.3.21/hmac.el nnimap-0.3.22/hmac.el
--- nnimap-0.3.21/hmac.el	Fri Aug 14 02:34:16 1998
+++ nnimap-0.3.22/hmac.el	Sat Aug 15 16:07:49 1998
@@ -18,7 +18,6 @@
 
 ;;; Commentary:
 
-;;;
 ;;; This is a quick'n'dirty implementation of RFC2104.
 ;;;
 ;;; Example:
@@ -27,7 +26,11 @@
 ;;; (hmac 'md5 64 16 "Jefe" "what do ya want for nothing?")
 ;;; "750c783e6ab0b503eaa86e310a5db738"
 ;;;
-;;; Tested with FSF Emacs 20.2 and XEmacs 20.3.
+;;; 64 is block length of hash function (64 for MD5 and SHA), 16 is
+;;; resulting hash length (16 for MD5, 20 for SHA).
+;;;
+;;; Tested with FSF Emacs 20.2 and XEmacs 20.3. Does not work with
+;;; FSF Emacs 19.
 ;;;
 
 (require 'cl)
diff -u nnimap-0.3.21/imap4rev1.el nnimap-0.3.22/imap4rev1.el
--- nnimap-0.3.21/imap4rev1.el	Fri Aug 14 02:10:07 1998
+++ nnimap-0.3.22/imap4rev1.el	Sat Aug 15 16:07:50 1998
@@ -794,7 +794,7 @@
             ((equal var 'APPENDUID)
              (imap-folder-set 'appenduid (cons value (caddr code))))
             ((equal var 'PERMANENTFLAGS)
-             (imap-folder-set 'permanentflags value))
+             (imap-folder-set 'permanentflags (mapcar 'symbol-name value)))
             ((equal var 'READ-ONLY)
              (imap-folder-set 'writable nil))
             ((equal var 'READ-WRITE)
diff -u nnimap-0.3.21/manual.html nnimap-0.3.22/manual.html
--- nnimap-0.3.21/manual.html	Fri Aug 14 02:36:06 1998
+++ nnimap-0.3.22/manual.html	Sat Aug 15 16:07:50 1998
@@ -36,6 +36,7 @@
       <ul>
 	<li><a href="#trix-verbose">Getting verbose information</a>
 	<li><a href="#trix-summary">Showing article length in the summary buffer</a>
+	<li><a href="#trix-caching">Article caching</a>
       </ul>
 </ul>
 
@@ -243,9 +244,23 @@
 
 <p>I've added the " (%c)" part at the end of the string.
 
+<h3><a name="trix-caching">Article caching</a></h3>
+
+<p>Are you using nnimap from home, over a dialup connection?  Then maybe "Article Caching", another Gnus feature, is for you.
+
+<p>You should really read the <a href="http://www.gnus.org/manual/gnus_3.html#SEC76">Gnus manual on Article Caching</a> to get the whole picture, but here is a simple setup for your convinience:
+
+<pre>
+(setq gnus-use-cache t)
+(setq gnus-cache-directory "~/Mail/cache/")
+(setq gnus-cache-enter-articles '(ticked dormant read unread))
+(setq gnus-cache-remove-articles nil)
+(setq gnus-cacheable-groups "^nnimap")
+</pre>
+
 <hr>
 <a href="mailto:jas@pdc.kth.se"><address>jas@pdc.kth.se</address></a>
 <!-- hhmts start -->
-Last modified: Thu Aug 13 13:04:38 METDST 1998
+Last modified: Fri Aug 14 20:08:16 METDST 1998
 <!-- hhmts end -->
 </body> </html>
diff -u nnimap-0.3.21/nnimap.el nnimap-0.3.22/nnimap.el
--- nnimap-0.3.21/nnimap.el	Fri Aug 14 02:31:37 1998
+++ nnimap-0.3.22/nnimap.el	Sat Aug 15 16:07:51 1998
@@ -44,6 +44,7 @@
 
 ;;; Todo (roughly in order of priority):
 
+;;;   o Clean up the login stuff. It's a huge mess.
 ;;;   o Verify that we don't use IMAP4rev1 specific things (RFC2060 App B)
 ;;;   o nnimap-request-close-group should do incremental flag setting
 ;;;     instead of first clearing all flags and setting them again. It also
@@ -61,6 +62,9 @@
 ;;;   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 Bulletin board stuff.
+;;;   o Respooling (fix Gnus?)
+;;;   o Subscribe to newly created mailboxes (how? nnimap-request-newgroups?)
 ;;;   o Add support for the following: (if applicable)
 
 ;;;       request-list-newsgroups, request-regenerate
@@ -72,14 +76,13 @@
 ;;;     about the group (possible?)
 ;;;   o UTF-7 encode mailbox names (does Gnus deal with SPC in group names?)
 ;;;   o Fix Gnus to handle leading '.' in group names
-;;;   o ACAP stuff (perhaps a different project, would be nice to ACAPify 
-;;;     .newsrc.eld)
-;;;   o MIME
 ;;;   o Fix the flag situation when using the Gnus Agent
 ;;;   o Support RFC2221 (Login referrals)
 ;;;   o IMAP2BIS compatibility (RFC2061)
 ;;;   o Debug imtest, it dumps with "Time is out of bounds" sometimes
-;;;   o Clean up the login stuff. It's a huge mess.
+;;;   o ACAP stuff (perhaps a different project, would be nice to ACAPify 
+;;;     .newsrc.eld)
+;;;   o MIME
 ;;;   
 
 (require 'imap4rev1)
@@ -93,7 +96,7 @@
 (eval-when-compile (require 'cl))
 
 (gnus-declare-backend "nnimap" 'mail 'address 'prompt-address 
-		      'physical-address)
+		      'physical-address 'respool)  ;; respool??
 
 (nnoo-declare nnimap) ; we derive from no one
 
@@ -299,7 +302,7 @@
 
 ;;; Interface functions, required backend functions
 
-;;; This seem to define the following:
+;;; This seems to define the following:
 ;;;  `nnimap-close-server'       `nnimap-server-opened'
 ;;;  `nnimap-open-server'        `nnimap-status-message'
 ;;; open-server -> nnoo-change-server
@@ -639,8 +642,8 @@
 	  (nnimap-send-command-wait 
                (concat "UID STORE 1:* -FLAGS.SILENT ("
                        (mapconcat 
-                        'symbol-name
-                        (remove '\\* (imap-folder-get 'permanentflags group))
+                        'identity
+                        (remove "\\*" (imap-folder-get 'permanentflags group))
                         " ")
                        ")")))
         (mapc
@@ -657,7 +660,11 @@
              nnimap-mark-to-flag-alist)))
       ;; When someone Qs out of a group we could EXAMINE first???
       ;; Close her up.  We don't necessarily have to do this.
-      (when (nnimap-ok-p (nnimap-send-command-wait "CLOSE"))
+      (when (or (and (memq 'UNSELECT (imap-capability-get))
+		     (nnimap-ok-p (nnimap-send-command-wait "UNSELECT")))
+		(and (nnimap-ok-p 
+		      (nnimap-send-command-wait (concat "EXAMINE " group)))
+		     (nnimap-ok-p (nnimap-send-command-wait "CLOSE"))))
         (setq imap-current-folder nil
               imap-message-data nil)
 	t))))
@@ -727,10 +734,12 @@
                                 (car pattern) " "
                                 (cdr pattern)))))
         (gnus-message 5 "Generating active list for %s" server)
-        (mapatoms (lambda (sym) (nnimap-request-list-mapper (symbol-name sym)))
-                  imap-data-folder)))
+	(let ((nnimap-group-list-speed 'fast))
+	  (mapatoms (lambda (sym) (nnimap-request-list-mapper 
+				   (symbol-name sym)))
+		    imap-data-folder)))
     (setq nnimap-group-alist (nnmail-get-active))
-    t))
+    t)))
   
 
 ;;; IMAP doesn't support posting, but this must be defined
@@ -749,7 +758,7 @@
     (with-current-buffer nnimap-server-buffer
       ;; Force the slow method for now since this will only be called
       ;; for subscribed groups. 
-      (let (group (nnimap-group-list-speed 'slow)) ; ???
+      (let (group)
         (gnus-message 5 "Generating active info for certain groups on %s"
                       server)
         (while (setq group (pop groups))
@@ -773,10 +782,9 @@
 (defun nnimap-flag-permanent-p (mark-string group)
   (or (member (cdr (assoc (car mark-string) 
                           nnimap-mark-to-flag-alist))
-              (mapcar 'symbol-name ; Yuck
-                      (imap-folder-get 'permanentflags group)))
+	      (imap-folder-get 'permanentflags group))
       (and (string-match "gnus-" (cdr mark-string))
-           (memq '\\* (imap-folder-get 'permanentflags group)))))
+           (member "\\*" (imap-folder-get 'permanentflags group)))))
   
 ;;; I really think this should update the active-info too???
 (deffoo nnimap-request-update-info (group info &optional server)
@@ -951,7 +959,8 @@
 		      (nnimap-split-move-article article inbox 
 						 (car groups))))))))
 	      (when (nnimap-possibly-change-group inbox) ;; just in case
-		(nnimap-send-command-wait "EXPUNGE")))))
+		(nnimap-send-command-wait "EXPUNGE") ;; to get tagged data
+		(nnimap-send-command-wait "CLOSE")))))
     t))
 
 ;; nnimap-request-scan doesn't need to do anything. the delivery agent
@@ -1128,33 +1137,34 @@
 
 (defun nnimap-possibly-change-group (group &optional server)
   (when (nnimap-possibly-change-server server)
+    (setq server (or server (nnoo-current-server 'nnimap)))
     (with-current-buffer nnimap-server-buffer
       (when group
 	(unless (string= group imap-current-folder)
 	  (setq imap-message-data (make-vector 199 0)) ; itty bitty obarray???
 	  ;; Folder must be set during SELECT
 	  (setq imap-current-folder group)
-	  (if (not (nnimap-ok-p (nnimap-send-command-wait
-				 (concat (if (gnus-ephemeral-group-p group)
-					     "EXAMINE"
-					   "SELECT")
-					 " " group))))
-	      ;; Failed SELECT unselects the current group
-	      (setq imap-current-folder nil)
-	    ;; check/set UIDVALIDITY
-	    (let* ((groupname (gnus-group-normally-qualified
-			       'nnimap
-			       (or server (nnoo-current-server 'nnimap))
-			       group))
-		   (new-uid (imap-folder-get 'uidvalidity))
-		   (old-uid (gnus-group-get-parameter groupname 'uidvalidity)))
-	      (if old-uid
-		  (when (not (equal old-uid new-uid))
-		    (message "UIDVALIDITY clash. Old value `%s', new `%s'"
-			     old-uid new-uid)
-		    (setq imap-current-folder nil))
-		(gnus-group-add-parameter groupname 
-					  (cons 'uidvalidity new-uid)))))))
+          (let ((groupname (gnus-group-normally-qualified
+                            'nnimap server group)))
+            (if (not (nnimap-ok-p (nnimap-send-command-wait
+                                   (concat (if (gnus-ephemeral-group-p
+                                                groupname)
+                                               "EXAMINE"
+                                             "SELECT")
+                                           " " group))))
+                ;; Failed SELECT unselects the current group
+                (setq imap-current-folder nil)
+              ;; check/set UIDVALIDITY
+              (let ((new-uid (imap-folder-get 'uidvalidity))
+                    (old-uid (gnus-group-get-parameter groupname 
+						       'uidvalidity)))
+                (if old-uid
+                    (when (not (equal old-uid new-uid))
+                      (message "UIDVALIDITY clash. Old value `%s', new `%s'"
+                               old-uid new-uid)
+                      (setq imap-current-folder nil))
+                  (gnus-group-add-parameter groupname 
+                                            (cons 'uidvalidity new-uid))))))))
       imap-current-folder)))
 
 ;;; Other functions
diff -u nnimap-0.3.21/ChangeLog nnimap-0.3.22/ChangeLog
--- nnimap-0.3.21/ChangeLog	Fri Aug 14 02:35:13 1998
+++ nnimap-0.3.22/ChangeLog	Sat Aug 15 16:07:49 1998
@@ -1,3 +1,42 @@
+1998-08-15 15:31:09  Simon Josefsson  <jas@pdc.kth.se>
+
+	* nnimap 0.3.22 released
+
+1998-08-15 15:26:33  Simon Josefsson  <jas@pdc.kth.se>
+
+	* Makefile: hmac and tar targets
+
+1998-08-15 14:54:55  Simon Josefsson  <jas@pdc.kth.se>
+
+	* nnimap.el (nnimap-split-articles): close mailbox
+
+1998-08-15 14:51:27  Simon Josefsson  <jas@pdc.kth.se>
+
+	* nnimap.el: 'respool in gnus-declare-backend required for
+	gnus-summary-article-move.
+
+1998-08-12  Jim Radford  <radford@robby.caltech.edu>
+
+        * nnimap.el (nnimap-possibly-change-group): Fixed emphemeral
+        support by passing normally qualifed name for `gnus-ephemeral-p'.
+
+1998-08-13  Jim Radford  <radford@robby.caltech.edu>
+
+        * nnimap.el (nnimap-request-list): 
+        * nnimap.el (nnimap-retrieve-groups): nnimap-request-list now default
+        to 'fast and lets nnimap-retrieve-groups return real data.
+
+        * nnimap.el (nnimap-close-group):
+        * nnimap.el (nnimap-request-update-info):
+        * nnimap.el (nnimap-flag-permanent-p):
+        * imap4rev1.el (imap-cb-response): permanentflags are now strings
+        so we don't have to convert every time.
+
+1998-08-15 14:42:04  Simon Josefsson  <jas@pdc.kth.se>
+
+	* nnimap.el (nnimap-close-group): don't use evil CLOSE, use
+	UNSELECT or EXAMINE+CLOSE
+
 1998-08-14 02:32:46  Simon Josefsson  <jas@pdc.kth.se>
 
 	* nnimap 0.3.21 released