[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
nnimap 0.123 -> 0.124 patches
- To: nnimap@extundo.com
- Subject: nnimap 0.123 -> 0.124 patches
- From: Simon Josefsson <jas@pdc.kth.se>
- Date: 17 Jul 1999 22:56:07 +0200
- User-Agent: Gnus/5.070095 (Pterodactyl Gnus v0.95) Emacs/20.4
Index: nnimap/ChangeLog
diff -u nnimap/ChangeLog:1.255 nnimap/ChangeLog:1.258
--- nnimap/ChangeLog:1.255 Mon Jul 12 06:39:11 1999
+++ nnimap/ChangeLog Sat Jul 17 13:55:04 1999
@@ -1,3 +1,28 @@
+1999-07-17 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap 0.124 released.
+
+ * imap.el (imap-message-append): Check APPEND result.
+
+ * nnimap.el (nnimap-request-group): Handle null minmax-info.
+ (nnimap-request-list): Handle null minmax-info.
+ (nnimap-request-newgroups): Ditto.
+
+ * imap.el (imap-mailbox-remove): New function.
+ (imap-mailbox-lsub): Don't clear mailbox data. UTF7 decode.
+ (imap-mailbox-list): Don't clear mailbox data.
+
+ * imap.el (imap-parse-data-list): Make 'delimiter correct.
+
+1999-07-17 Donald Hunter <dhunter@atlan-tech.com>
+
+ * imap.el (imap-parse-data-list): Handle quoted-specials.
+
+1999-07-16 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-post): New function.
+ (nnimap-request-list): Fix message.
+
1999-07-12 Simon Josefsson <jas@pdc.kth.se>
* nnimap 0.123 released.
Index: nnimap/imap.el
diff -u nnimap/imap.el:1.158 nnimap/imap.el:1.159
--- nnimap/imap.el:1.158 Mon Jul 12 06:20:28 1999
+++ nnimap/imap.el Sat Jul 17 13:41:29 1999
@@ -842,10 +842,15 @@
server in BUFFER. REFERENCE is the implementation-specific string that
has to be passed to LSUB."
(with-current-buffer (or buffer (current-buffer))
- (setq imap-mailbox-data (make-vector imap-mailbox-prime 0))
+ (imap-mailbox-map (lambda (mailbox)
+ (imap-mailbox-put 'lsub nil mailbox)))
(when (imap-ok-p (imap-send-command-wait
(concat "LSUB \"" reference "\" \"*\"")))
- (imap-mailbox-map 'identity))))
+ (let (out)
+ (imap-mailbox-map (lambda (mailbox)
+ (when (imap-mailbox-get 'lsub mailbox)
+ (push (imap-utf7-decode mailbox) out))))
+ (nreverse out)))))
(defun imap-mailbox-list (&optional buffer root have-delimiter reference)
"List all mailboxes that starts with ROOT in BUFFER. If
@@ -853,7 +858,8 @@
ROOT. REFERENCE is the implementation-specific string that has to be
passed to LIST."
(with-current-buffer (or buffer (current-buffer))
- (setq imap-mailbox-data (make-vector imap-mailbox-prime 0))
+ (imap-mailbox-map (lambda (mailbox)
+ (imap-mailbox-put 'list nil mailbox)))
;; Find hierarchy separator if root turns out to be a mailbox
;; instead of just a prefix.
(when root
@@ -866,7 +872,11 @@
(when (and root (not have-delimiter))
(imap-mailbox-get 'delimiter root))
"%\"")))
- (imap-mailbox-map 'imap-utf7-decode))))
+ (let (out)
+ (imap-mailbox-map (lambda (mailbox)
+ (when (imap-mailbox-get 'list mailbox)
+ (push (imap-utf7-decode mailbox) out))))
+ (nreverse out)))))
(defun imap-mailbox-subscribe (mailbox &optional buffer)
"Send the SUBSCRIBE command on the mailbox to server in
@@ -1132,11 +1142,11 @@
DATE-TIME is currently not used. Return a cons holding uidvalidity of
MAILBOX and UID the newly created article got, or nil on failure."
(with-current-buffer (or buffer (current-buffer))
- (let ((imap-current-target-mailbox mailbox))
- (imap-ok-p
- (imap-send-command-wait
- (list "APPEND \"" (imap-utf7-encode mailbox) "\" " article))))
- (imap-message-appenduid mailbox)))
+ (and (let ((imap-current-target-mailbox mailbox))
+ (imap-ok-p
+ (imap-send-command-wait
+ (list "APPEND \"" (imap-utf7-encode mailbox) "\" " article))))
+ (imap-message-appenduid mailbox))))
(defun imap-body-lines (body)
"Return number of lines in article by looking at the mime bodystructure
@@ -1680,7 +1690,7 @@
(defun imap-parse-data-list (type)
(let (flags delimiter mailbox)
(setq flags (imap-parse-flag-list))
- (when (looking-at " NIL\\| \"\\(.\\)\"")
+ (when (looking-at " NIL\\| \"\\\\?\\(.\\)\"")
(setq delimiter (match-string 1))
(goto-char (1+ (match-end 0)))
(when (setq mailbox (imap-parse-mailbox))
Index: nnimap/nnimap.el
diff -u nnimap/nnimap.el:1.206 nnimap/nnimap.el:1.209
--- nnimap/nnimap.el:1.206 Mon Jul 12 06:25:46 1999
+++ nnimap/nnimap.el Sat Jul 17 13:40:08 1999
@@ -72,7 +72,7 @@
(gnus-declare-backend "nnimap" 'mail 'address 'prompt-address
'physical-address)
-(defconst nnimap-version "nnimap 0.123")
+(defconst nnimap-version "nnimap 0.124")
(defvoo nnimap-address nil
"Address of physical IMAP server. If nil, use the virtual server's name.")
@@ -542,15 +542,18 @@
server)
(when (nnimap-possibly-change-group group server)
(with-current-buffer nnimap-server-buffer
- (unless fast
- (let (info)
- (when (setq info (nnimap-find-minmax-uid group))
- (nnheader-insert "211 %d %d %d %s\n" (or (nth 0 info) 0)
- (max 1 (or (nth 1 info) 1))
- (or (nth 2 info) 0) group))))
- (nnheader-report 'nnimap "Group %s selected" group)
- t)))
-
+ (let (info)
+ (cond (fast group)
+ ((null (setq info (nnimap-find-minmax-uid group)))
+ (nnheader-report 'nnimap "Could not get active info for %s"
+ group))
+ (t
+ (nnheader-insert "211 %d %d %d %s\n" (or (nth 0 info) 0)
+ (max 1 (or (nth 1 info) 1))
+ (or (nth 2 info) 0) group)
+ (nnheader-report 'nnimap "Group %s selected" group)
+ t))))))
+
(defun nnimap-expunge-close-group (&optional server)
(with-current-buffer nnimap-server-buffer
(when (nnimap-possibly-change-server server)
@@ -582,7 +585,7 @@
(when (nnimap-possibly-change-server server)
(with-current-buffer nntp-server-buffer
(gnus-message 5 "nnimap: Generating active list%s..."
- (if server (concat " for " server) ""))
+ (if (> (length server) 0) (concat " for " server) ""))
(erase-buffer)
(dolist (pattern (nnimap-pattern-to-list-arguments
nnimap-list-pattern))
@@ -590,18 +593,21 @@
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
(let ((info (nnimap-find-minmax-uid mbx 'examine)))
- (insert (format "%s %d %d y\n"
- (nnimap-replace-in-string mbx " " "\\ ")
- (or (nth 2 info) 0)
- (max 1 (or (nth 1 info) 1))))))))
+ (when info
+ ;; Escape SPC in mailboxes xxx relies on gnus internals
+ (insert (format "%s %d %d y\n"
+ (nnimap-replace-in-string mbx " " "\\ ")
+ (or (nth 2 info) 0)
+ (max 1 (or (nth 1 info) 1)))))))))
(gnus-message 5 "nnimap: Generating active list%s...done"
(if server (concat " for " server) "")))
t))
(deffoo nnimap-request-post (&optional server)
- (nnheader-report 'nnimap "Nnimap doesn't support posting"))
+ (dolist (mbx (message-tokenize-header (message-fetch-field "Newsgroups")))
+ (nnimap-request-accept-article mbx (nth 1 gnus-command-method)))
+ t)
;; Optional backend functions
@@ -799,10 +805,11 @@
(imap-mailbox-get 'list-flags mbx nnimap-server-buffer))
;; Escape SPC in mailboxes xxx relies on gnus internals
(let ((info (nnimap-find-minmax-uid mbx 'examine)))
- (insert (format "%s %d %d y\n"
- (nnimap-replace-in-string mbx " " "\\ ")
- (or (nth 2 info) 0)
- (max 1 (or (nth 1 info) 1))))))))
+ (when info
+ (insert (format "%s %d %d y\n"
+ (nnimap-replace-in-string mbx " " "\\ ")
+ (or (nth 2 info) 0)
+ (max 1 (or (nth 1 info) 1)))))))))
(gnus-message 5 "nnimap: Listing subscribed mailboxes%s%s...done"
(if (> (length server) 0) " on " "") server))
t))
Index: nnimap/nnimap.texi
diff -u nnimap/nnimap.texi:1.29 nnimap/nnimap.texi:1.30
--- nnimap/nnimap.texi:1.29 Mon Jul 12 06:35:28 1999
+++ nnimap/nnimap.texi Sat Jul 17 13:42:08 1999
@@ -7,7 +7,7 @@
@setchapternewpage odd
@paragraphindent 0
-@set VERSION $Revision: 1.1 $
+@set VERSION $Revision: 1.1 $
@set NNIMAP-VERSION 0.123
@ifinfo
@@ -848,7 +848,8 @@
everybody I've forgotten.
John Prevost, Jim Radford, Marty Fouts, Jake Colman, Jeff Senn, Trung
-Tran-Duc, Matt Armstrong, Keisuke Mori, Daiki Ueno, Jon K Hellan
+Tran-Duc, Matt Armstrong, Keisuke Mori, Daiki Ueno, Jon K Hellan, Donald
+Hunter
@node concepts, variables, contributors, Top
@unnumbered Concept Index