[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
nnimap 0.110 -> 0.111 patches
- To: nnimap@extundo.com
- Subject: nnimap 0.110 -> 0.111 patches
- From: Simon Josefsson <jas@pdc.kth.se>
- Date: 01 Jun 1999 21:59:23 +0200
- User-Agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.3.10
Index: nnimap/ChangeLog
diff -c nnimap/ChangeLog:1.221 nnimap/ChangeLog:1.222
*** nnimap/ChangeLog:1.221 Mon May 31 09:24:25 1999
--- nnimap/ChangeLog Tue Jun 1 12:53:15 1999
***************
*** 1,3 ****
--- 1,22 ----
+ 1999-06-01 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap 0.111 released.
+
+ * imap.el (imap-local-variables): Make `imap-message-data' and
+ `imap-mailbox-data' buffer local.
+
+ * nnimap.el (nnimap-retrieve-headers-progress): Select server
+ buffer. Handle IMAP4-only servers.
+ (nnimap-retrieve-headers): Handle IMAP4-only servers.
+ (nnimap-open-connection): Imap-capability is case insensitive.
+
+ * imap.el (imap-parse-response): Upcase capability string.
+ (imap-capability): Upcase identifier.
+
+ * nnimap.el (nnimap-find-minmax-uid): Always change mailbox.
+
+ * imap.el (imap-mailbox-select): Return t if already selected.
+
1999-05-31 Simon Josefsson <jas@pdc.kth.se>
* nnimap 0.110 released.
Index: nnimap/imap.el
diff -c nnimap/imap.el:1.139 nnimap/imap.el:1.140
*** nnimap/imap.el:1.139 Thu May 27 09:36:24 1999
--- nnimap/imap.el Tue Jun 1 12:52:40 1999
***************
*** 213,218 ****
--- 213,220 ----
imap-password
imap-current-mailbox
imap-current-target-mailbox
+ imap-message-data
+ imap-mailbox-data
imap-capability
imap-namespace
imap-state
***************
*** 641,647 ****
(unless (imap-ok-p (imap-send-command-wait "CAPABILITY"))
(setq imap-capability '(IMAP2))))
(if identifier
! (memq identifier imap-capability)
imap-capability)))
(defun imap-namespace (&optional buffer)
--- 643,649 ----
(unless (imap-ok-p (imap-send-command-wait "CAPABILITY"))
(setq imap-capability '(IMAP2))))
(if identifier
! (memq (intern (upcase (symbol-name identifier))) imap-capability)
imap-capability)))
(defun imap-namespace (&optional buffer)
***************
*** 688,698 ****
"Select MAILBOX on server in BUFFER. If EXAMINE is non-nil, do a
read-only select."
(with-current-buffer (or buffer (current-buffer))
! (unless (and (string= mailbox imap-current-mailbox)
! (or (and examine
! (eq imap-state 'examine))
! (and (not examine)
! (eq imap-state 'selected))))
(let ((old-mailbox imap-current-mailbox)
(old-data imap-mailbox-data))
(setq imap-current-mailbox mailbox
--- 690,701 ----
"Select MAILBOX on server in BUFFER. If EXAMINE is non-nil, do a
read-only select."
(with-current-buffer (or buffer (current-buffer))
! (if (and (string= mailbox imap-current-mailbox)
! (or (and examine
! (eq imap-state 'examine))
! (and (not examine)
! (eq imap-state 'selected))))
! imap-current-mailbox
(let ((old-mailbox imap-current-mailbox)
(old-data imap-mailbox-data))
(setq imap-current-mailbox mailbox
***************
*** 1429,1435 ****
(read (concat "(" (buffer-substring (point) (point-max)) ")"))))
(STATUS (imap-parse-status))
(CAPABILITY (setq imap-capability
! (read (concat "(" (buffer-substring (point) (point-max))
")"))))
(ACL (imap-parse-acl))
(t (case (prog1 (read (current-buffer))
--- 1432,1439 ----
(read (concat "(" (buffer-substring (point) (point-max)) ")"))))
(STATUS (imap-parse-status))
(CAPABILITY (setq imap-capability
! (read (concat "(" (upcase (buffer-substring
! (point) (point-max)))
")"))))
(ACL (imap-parse-acl))
(t (case (prog1 (read (current-buffer))
Index: nnimap/nnimap.el
diff -c nnimap/nnimap.el:1.175 nnimap/nnimap.el:1.176
*** nnimap/nnimap.el:1.175 Mon May 31 09:23:59 1999
--- nnimap/nnimap.el Tue Jun 1 12:52:57 1999
***************
*** 99,105 ****
(gnus-declare-backend "nnimap" 'mail 'address 'prompt-address
'physical-address)
! (defconst nnimap-version "nnimap 0.110")
(defvoo nnimap-address nil
"Address of physical IMAP server. If nil, use the virtual server's name.")
--- 99,105 ----
(gnus-declare-backend "nnimap" 'mail 'address 'prompt-address
'physical-address)
! (defconst nnimap-version "nnimap 0.111")
(defvoo nnimap-address nil
"Address of physical IMAP server. If nil, use the virtual server's name.")
***************
*** 309,316 ****
(defun nnimap-find-minmax-uid (group &optional examine)
(with-current-buffer nnimap-server-buffer
! (when (or (string= group imap-current-mailbox)
! (imap-mailbox-select group nil examine))
(let (minuid maxuid)
(imap-fetch "1,*" "UID" nil 'nouidfetch)
(imap-message-map (lambda (uid Uid)
--- 309,315 ----
(defun nnimap-find-minmax-uid (group &optional examine)
(with-current-buffer nnimap-server-buffer
! (when (imap-mailbox-select group nil examine)
(let (minuid maxuid)
(imap-fetch "1,*" "UID" nil 'nouidfetch)
(imap-message-map (lambda (uid Uid)
***************
*** 354,384 ****
(/ (* nnimap-counter 100) nnimap-length)))
(with-current-buffer nntp-server-buffer
(nnheader-insert-nov
! (vector imap-current-message
! (nnimap-replace-whitespace
! (imap-message-envelope-subject imap-current-message))
! (nnimap-replace-whitespace
! (imap-envelope-from
! (car-safe (imap-message-envelope-from
! imap-current-message))))
! (nnimap-replace-whitespace
! (imap-message-envelope-date imap-current-message))
! (nnimap-replace-whitespace
! (imap-message-envelope-message-id imap-current-message))
! (let ((str (nth 2 (assoc "HEADER.FIELDS REFERENCES IN-REPLY-TO"
(imap-message-get
! imap-current-message 'BODYDETAIL))))
! out)
! (when (string-match "<[^>]+>" str)
! (setq out (substring str (match-beginning 0) (match-end 0)))
! (while (string-match "<[^>]+>" str (match-end 0))
! (setq out (concat " " (substring str (match-beginning 0)
! (match-end 0))))))
! (and out (gnus-strip-whitespace out)))
! (imap-message-get imap-current-message 'RFC822.SIZE)
! (imap-body-lines (imap-message-body imap-current-message))
! nil ;; xref
! nil)))) ;; extra-headers
(defun nnimap-retrieve-headers-store-uids ()
(setq nnimap-uids (cons imap-current-message nnimap-uids)))
--- 353,388 ----
(/ (* nnimap-counter 100) nnimap-length)))
(with-current-buffer nntp-server-buffer
(nnheader-insert-nov
! (with-current-buffer nnimap-server-buffer
! (vector imap-current-message
! (nnimap-replace-whitespace
! (imap-message-envelope-subject imap-current-message))
! (nnimap-replace-whitespace
! (imap-envelope-from
! (car-safe (imap-message-envelope-from
! imap-current-message))))
! (nnimap-replace-whitespace
! (imap-message-envelope-date imap-current-message))
! (nnimap-replace-whitespace
! (imap-message-envelope-message-id imap-current-message))
! (let ((str (if (imap-capability 'IMAP4rev1)
! (nth 2 (assoc
! "HEADER.FIELDS REFERENCES IN-REPLY-TO"
(imap-message-get
! imap-current-message 'BODYDETAIL)))
! (imap-message-get imap-current-message
! 'RFC822.HEADER)))
! out)
! (when (string-match "<[^>]+>" str)
! (setq out (substring str (match-beginning 0) (match-end 0)))
! (while (string-match "<[^>]+>" str (match-end 0))
! (setq out (concat " " (substring str (match-beginning 0)
! (match-end 0))))))
! (and out (gnus-strip-whitespace out)))
! (imap-message-get imap-current-message 'RFC822.SIZE)
! (imap-body-lines (imap-message-body imap-current-message))
! nil ;; xref
! nil))))) ;; extra-headers
(defun nnimap-retrieve-headers-store-uids ()
(setq nnimap-uids (cons imap-current-message nnimap-uids)))
***************
*** 406,413 ****
(nnimap-length (length articles))
(nnimap-counter 0))
(imap-fetch (nnimap-range-to-string (gnus-compress-sequence uids t))
! (concat "(UID RFC822.SIZE ENVELOPE BODY "
! "BODY.PEEK[HEADER.FIELDS (References In-Reply-To)])")
nil nil nnimap-server-buffer)
(and (numberp nnmail-large-newsgroup)
(> nnimap-length nnmail-large-newsgroup)
--- 410,420 ----
(nnimap-length (length articles))
(nnimap-counter 0))
(imap-fetch (nnimap-range-to-string (gnus-compress-sequence uids t))
! (concat
! "(UID RFC822.SIZE ENVELOPE BODY "
! (if (imap-capability 'IMAP4rev1 nnimap-server-buffer)
! "BODY.PEEK[HEADER.FIELDS (References In-Reply-To)])"
! "RFC822.HEADER.LINES (References In-Reply-To))"))
nil nil nnimap-server-buffer)
(and (numberp nnmail-large-newsgroup)
(> nnimap-length nnmail-large-newsgroup)
***************
*** 419,426 ****
nnimap-authenticator nnimap-server-buffer))
(nnheader-report 'nnimap "Can't open connection to server %s" server)
(unless (or (imap-capability 'IMAP4 nnimap-server-buffer)
! (imap-capability 'IMAP4rev1 nnimap-server-buffer)
! (imap-capability 'IMAP4REV1 nnimap-server-buffer))
(imap-close nnimap-server-buffer)
(nnheader-report 'nnimap "Server %s is not IMAP4 compliant" server))
(let (list alist user passwd)
--- 426,432 ----
nnimap-authenticator nnimap-server-buffer))
(nnheader-report 'nnimap "Can't open connection to server %s" server)
(unless (or (imap-capability 'IMAP4 nnimap-server-buffer)
! (imap-capability 'IMAP4rev1 nnimap-server-buffer))
(imap-close nnimap-server-buffer)
(nnheader-report 'nnimap "Server %s is not IMAP4 compliant" server))
(let (list alist user passwd)