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

nnimap 0.120 -> 0.121 patches



Index: nnimap/ChangeLog
diff -c nnimap/ChangeLog:1.247 nnimap/ChangeLog:1.248
*** nnimap/ChangeLog:1.247	Mon Jul  5 05:58:20 1999
--- nnimap/ChangeLog	Mon Jul  5 07:15:27 1999
***************
*** 1,5 ****
--- 1,12 ----
  1999-07-05  Simon Josefsson  <jas@pdc.kth.se>
  
+ 	* nnimap 0.121 released.
+ 
+ 	* nnimap.el (nnimap-replace-in-string): New function.
+ 	(nnimap-request-list): Use it.
+ 	(nnimap-retrieve-groups): Use it.
+ 	(nnimap-retrieve-headers-from-file): Use mm-insert-file-contents.
+ 
  	* nnimap 0.120 released.
  
  	* nnimap.el (nnimap-group-overview-filename): New function.
Index: nnimap/nnimap.el
diff -c nnimap/nnimap.el:1.196 nnimap/nnimap.el:1.197
*** nnimap/nnimap.el:1.196	Mon Jul  5 05:05:13 1999
--- nnimap/nnimap.el	Mon Jul  5 07:15:13 1999
***************
*** 55,60 ****
--- 55,62 ----
  
  (require 'nnoo)
  (require 'nnmail)
+ (require 'nnheader)
+ (require 'mm-util)
  (require 'gnus)
  (require 'gnus-range)
  
***************
*** 63,69 ****
  (gnus-declare-backend "nnimap" 'mail 'address 'prompt-address
  		      'physical-address)
  
! (defconst nnimap-version "nnimap 0.120")
  
  (defvoo nnimap-address nil
    "Address of physical IMAP server.  If nil, use the virtual server's name.")
--- 65,71 ----
  (gnus-declare-backend "nnimap" 'mail 'address 'prompt-address
  		      'physical-address)
  
! (defconst nnimap-version "nnimap 0.121")
  
  (defvoo nnimap-address nil
    "Address of physical IMAP server.  If nil, use the virtual server's name.")
***************
*** 227,232 ****
--- 229,242 ----
  
  ;; Utility functions:
  
+ (defun nnimap-replace-in-string (string regexp to)
+   (if (string-match regexp string)
+       (concat (substring string 0 (match-beginning 0))
+ 	      to
+ 	      (nnimap-replace-in-string (substring string (match-end 0))
+ 				 regexp to))
+     string))
+ 
  (defsubst nnimap-get-server-buffer (server)
    "Return buffer for SERVER. If SERVER is nil, the current server is
  used."
***************
*** 365,371 ****
      (erase-buffer)
      (let ((nov (nnimap-group-overview-filename group server)))
        (when (file-exists-p nov)
! 	(nnheader-insert-file-contents nov)
  	(nnheader-nov-delete-outside-range (car articles) 
  					   (car (last articles)))))))
  
--- 375,381 ----
      (erase-buffer)
      (let ((nov (nnimap-group-overview-filename group server)))
        (when (file-exists-p nov)
! 	(mm-insert-file-contents nov)
  	(nnheader-nov-delete-outside-range (car articles) 
  					   (car (last articles)))))))
  
***************
*** 569,580 ****
  		      nnimap-server-buffer (cdr pattern) t (car pattern)))
  	  (or (member "\\NoSelect" 
  		      (imap-mailbox-get 'list-flags mbx nnimap-server-buffer))
! 	      ;; Quote mailboxes if they contain SPC
! 	      ;; xxx relies on internal knowledge of gnus, breaks nntp rfc
  	      ;; We lie about high/low article number
! 	      (if (string-match " " mbx)
! 		  (insert (format "\"%s\" 0 1 y\n" mbx))
! 		(insert (format "%s 0 1 y\n" mbx))))))
        (gnus-message 5 "nnimap: Generating active list for %s...done" server))
      t))
  
--- 579,588 ----
  		      nnimap-server-buffer (cdr pattern) t (car pattern)))
  	  (or (member "\\NoSelect" 
  		      (imap-mailbox-get 'list-flags mbx nnimap-server-buffer))
! 	      ;; Escape SPC in mailboxes xxx relies on gnus internals
  	      ;; We lie about high/low article number
! 	      (insert (format "%s 0 1 y\n" 
! 			      (nnimap-replace-in-string mbx " " "\\ "))))))
        (gnus-message 5 "nnimap: Generating active list for %s...done" server))
      t))
  
***************
*** 595,601 ****
  	    (let ((info (nnimap-find-minmax-uid group 'examine)))
  	      (insert (format "211 %d %d %d %s\n" (or (nth 0 info) 0)
  			      (max 1 (or (nth 1 info) 1))
! 			      (or (nth 2 info) 0) group))))))
      (gnus-message 5 "nnimap: Checking mailboxes...done")
      'groups))
  
--- 603,610 ----
  	    (let ((info (nnimap-find-minmax-uid group 'examine)))
  	      (insert (format "211 %d %d %d %s\n" (or (nth 0 info) 0)
  			      (max 1 (or (nth 1 info) 1))
! 			      (or (nth 2 info) 0)
! 			      (nnimap-replace-in-string group " " "\\ ")))))))
      (gnus-message 5 "nnimap: Checking mailboxes...done")
      'groups))