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

nnimap 0.94 -> 0.95 patches



Index: nnimap/ChangeLog
diff -c nnimap/ChangeLog:1.181 nnimap/ChangeLog:1.188
*** nnimap/ChangeLog:1.181	Tue Mar 16 12:25:06 1999
--- nnimap/ChangeLog	Fri Mar 26 13:45:44 1999
***************
*** 1,3 ****
--- 1,65 ----
+ 1999-03-26  Simon Josefsson  <jas@pdc.kth.se>
+ 
+ 	* nnimap 0.95 released.
+ 
+ 	* nnimap.el (nnimap-request-set-mark): Don't set flags we
+ 	shouldn't set. Don't forbid removing of "replied" flag.
+ 
+ 	* imap.el (imap-message-flags-permanent-p): New function.
+ 
+ 	* nnimap.el (nnimap-mark-permanent-p): Use it.
+ 
+ 1999-03-23  Trung Tran-Duc <trung.tranduc@prague.ixos.cz>
+ 
+ 	* nnimap.el (nnimap-date-days-ago): Don't send 2 digit year.
+ 
+ 1999-03-23  Simon Josefsson  <jas@pdc.kth.se>
+ 
+ 	* imap.el (imap-parse-nil): Return parse result.
+ 	(imap-parse-nstring): Ignore nnimap-parse-nil result.
+ 	(imap-parse-string-list): Parse nil's.
+ 	(imap-parse-body-ext): Parse better.
+ 	(imap-parse-body): Assert on parse failure. Ignore
+ 	nnimap-parse-nil result. body-ext-* parser works.
+ 
+ 1999-03-22  Simon Josefsson  <jas@pdc.kth.se>
+ 
+ 	* imap.el (imap-message-envelope-*): 
+ 	(imap-message-body): New macros.
+ 	(imap-parse-number): Don't use read.
+ 
+ 1999-03-21  Simon Josefsson  <jas@pdc.kth.se>
+ 
+ 	* imap.el (imap-parse-string-list):
+ 	(imap-parse-body-extension):
+ 	(imap-parse-body-ext): 
+ 	(imap-parse-body): Rewrite without read.
+ 	(imap-parse-nil): New function.
+ 	(imap-parse-nstring):
+ 	(imap-parse-body): 
+ 	(imap-parse-address-list): Use it.
+ 	(imap-parse-number): Don't use read.
+ 
+ 1999-03-20  Simon Josefsson  <jas@pdc.kth.se>
+ 
+ 	* imap.el (imap-parse-string): Use b-s-no-properties. Don't use
+ 	read.	
+ 	(imap-parse-flag-list): Use b-s-no-properties.
+ 	(imap-parse-literal): Use b-s-no-properties.
+ 	(imap-parse-address): New function.
+ 	(imap-parse-address-list): New function.
+ 	(imap-parse-envelope): Rewrite without read.
+ 	(imap-parse-number): New function.
+ 	(imap-parse-body): Rewrite without read.
+ 
+ 1999-03-19  Simon Josefsson  <jas@pdc.kth.se>
+ 
+ 	* imap.el (imap-parse-address): New function.
+ 
+ 1999-03-18  Simon Josefsson  <jas@pdc.kth.se>
+ 
+ 	* imap.el (require): Require cl.
+ 
  1999-03-16  Simon Josefsson  <jas@pdc.kth.se>
  
  	* nnimap 0.94 released.
Index: nnimap/imap.el
diff -c nnimap/imap.el:1.116 nnimap/imap.el:1.122
*** nnimap/imap.el:1.116	Tue Mar 16 12:11:13 1999
--- nnimap/imap.el	Fri Mar 26 13:36:35 1999
***************
*** 137,145 ****
  
  ;;; Code:
  
- (eval-when-compile (require 'cl))
- 
  (eval-and-compile
    (autoload 'open-ssl-stream "ssl")
    (autoload 'base64-decode "base64")
    (autoload 'rfc2104-hash "rfc2104")
--- 137,144 ----
  
  ;;; Code:
  
  (eval-and-compile
+   (require 'cl)
    (autoload 'open-ssl-stream "ssl")
    (autoload 'base64-decode "base64")
    (autoload 'rfc2104-hash "rfc2104")
***************
*** 843,854 ****
--- 842,904 ----
         imap-message-data)
        result)))
  
+ (defmacro imap-message-envelope-date (uid &optional buffer)
+   `(with-current-buffer (or ,buffer (current-buffer))
+      (elt (imap-message-get ,uid 'ENVELOPE) 0)))
+ 
+ (defmacro imap-message-envelope-subject (uid &optional buffer)
+   `(with-current-buffer (or ,buffer (current-buffer))
+      (elt (imap-message-get ,uid 'ENVELOPE) 1)))
+ 
+ (defmacro imap-message-envelope-from (uid &optional buffer)
+   `(with-current-buffer (or ,buffer (current-buffer))
+      (elt (imap-message-get ,uid 'ENVELOPE) 2)))
+ 
+ (defmacro imap-message-envelope-sender (uid &optional buffer)
+   `(with-current-buffer (or ,buffer (current-buffer))
+      (elt (imap-message-get ,uid 'ENVELOPE) 3)))
+ 
+ (defmacro imap-message-envelope-reply-to (uid &optional buffer)
+   `(with-current-buffer (or ,buffer (current-buffer))
+      (elt (imap-message-get ,uid 'ENVELOPE) 4)))
+ 
+ (defmacro imap-message-envelope-to (uid &optional buffer)
+   `(with-current-buffer (or ,buffer (current-buffer))
+      (elt (imap-message-get ,uid 'ENVELOPE) 5)))
+ 
+ (defmacro imap-message-envelope-cc (uid &optional buffer)
+   `(with-current-buffer (or ,buffer (current-buffer))
+      (elt (imap-message-get ,uid 'ENVELOPE) 6)))
+ 
+ (defmacro imap-message-envelope-bcc (uid &optional buffer)
+   `(with-current-buffer (or ,buffer (current-buffer))
+      (elt (imap-message-get ,uid 'ENVELOPE) 7)))
+ 
+ (defmacro imap-message-envelope-in-reply-to (uid &optional buffer)
+   `(with-current-buffer (or ,buffer (current-buffer))
+      (elt (imap-message-get ,uid 'ENVELOPE) 8)))
+ 
+ (defmacro imap-message-envelope-message-id (uid &optional buffer)
+   `(with-current-buffer (or ,buffer (current-buffer))
+      (elt (imap-message-get ,uid 'ENVELOPE) 9)))
+ 
+ (defmacro imap-message-body (uid &optional buffer)
+   `(with-current-buffer (or ,buffer (current-buffer))
+      (imap-message-get ,uid 'BODY)))
+ 
  (defun imap-search (predicate &optional buffer)
    (with-current-buffer (or buffer (current-buffer))
      (imap-mailbox-put 'search nil)
      (when (imap-ok-p (imap-send-command-wait (concat "UID SEARCH " predicate)))
        (imap-mailbox-get 'search))))
  
+ (defun imap-message-flag-permanent-p (flag &optional mailbox buffer)
+   "Return t iff FLAG can be permanently (between IMAP sessions) saved
+ on articles, in MAILBOX on server in BUFFER."
+   (with-current-buffer (or buffer (current-buffer))
+     (or (member "\\*" (imap-mailbox-get 'permanentflags mailbox))
+ 	(member flag (imap-mailbox-get 'permanentflags mailbox)))))
+ 
  (defun imap-message-flags-set (articles flags &optional buffer silent)
    (when (and articles flags)
      (with-current-buffer (or buffer (current-buffer))
***************
*** 1029,1034 ****
--- 1079,1094 ----
  
  ;; Imap parser.
  
+ ;;   number          = 1*DIGIT
+ ;;                       ; Unsigned 32-bit integer
+ ;;                       ; (0 <= n < 4,294,967,296)
+ 
+ (defsubst imap-parse-number ()
+   (when (looking-at "[0-9]+")
+     (prog1
+ 	(string-to-number (match-string 0))
+       (goto-char (match-end 0)))))
+ 
  ;;   literal         = "{" number "}" CRLF *CHAR8
  ;;                       ; Number represents the number of CHAR8s
  
***************
*** 1039,1045 ****
        (if (< (point-max) (+ pos len))
  	  nil
  	(goto-char (+ pos len))
! 	(buffer-substring pos (+ pos len))))))
  
  ;;   string          = quoted / literal
  ;;
--- 1099,1105 ----
        (if (< (point-max) (+ pos len))
  	  nil
  	(goto-char (+ pos len))
! 	(buffer-substring-no-properties pos (+ pos len))))))
  
  ;;   string          = quoted / literal
  ;;
***************
*** 1053,1072 ****
  ;;   TEXT-CHAR       = <any CHAR except CR and LF>
  
  (defsubst imap-parse-string ()
!   (cond ((eq (char-after) ?\")
! 	 (read (current-buffer)))
! 	((eq (char-after) ?{)
! 	 (imap-parse-literal))))
!   
  ;;   nil             = "NIL"
! ;;
  ;;   nstring         = string / nil
  
  (defsubst imap-parse-nstring ()
    (or (imap-parse-string)
!       (when (looking-at "NIL")
! 	(goto-char (+ (point) 3))
! 	nil)))
  
  ;;   astring         = atom / string
  ;;
--- 1113,1138 ----
  ;;   TEXT-CHAR       = <any CHAR except CR and LF>
  
  (defsubst imap-parse-string ()
!   (let (strstart strend)
!     (cond ((and (eq (char-after) ?\")
! 		(setq strstart (point))
! 		(setq strend (search-forward "\"" nil t 2)))
! 	   (buffer-substring-no-properties (1+ strstart) (1- strend)))
! 	  ((eq (char-after) ?{)
! 	   (imap-parse-literal)))))
! 
  ;;   nil             = "NIL"
! 
! (defsubst imap-parse-nil ()
!   (if (looking-at "NIL")
!       (goto-char (match-end 0))))
! 
  ;;   nstring         = string / nil
  
  (defsubst imap-parse-nstring ()
    (or (imap-parse-string)
!       (and (imap-parse-nil)
! 	   nil)))
  
  ;;   astring         = atom / string
  ;;
***************
*** 1085,1090 ****
--- 1151,1211 ----
    (or (imap-parse-string)
        (symbol-name (read (current-buffer)))))
  
+ ;;   address         = "(" addr-name SP addr-adl SP addr-mailbox SP
+ ;;                      addr-host ")"
+ ;;
+ ;;   addr-adl        = nstring
+ ;;                       ; Holds route from [RFC-822] route-addr if
+ ;;                       ; non-NIL
+ ;;
+ ;;   addr-host       = nstring
+ ;;                       ; NIL indicates [RFC-822] group syntax.
+ ;;                       ; Otherwise, holds [RFC-822] domain name
+ ;;
+ ;;   addr-mailbox    = nstring
+ ;;                       ; NIL indicates end of [RFC-822] group; if
+ ;;                       ; non-NIL and addr-host is NIL, holds
+ ;;                       ; [RFC-822] group name.
+ ;;                       ; Otherwise, holds [RFC-822] local-part
+ ;;                       ; after removing [RFC-822] quoting
+ ;;
+ ;;   addr-name       = nstring
+ ;;                       ; If non-NIL, holds phrase from [RFC-822]
+ ;;                       ; mailbox after removing [RFC-822] quoting
+ ;;
+ 
+ (defsubst imap-parse-address ()
+   (let (address)
+     (when (eq (char-after) ?\()
+       (or (eobp) (forward-char))
+       (setq address (vector (prog1 (imap-parse-nstring)
+ 			      (or (eobp) (forward-char)))
+ 			    (prog1 (imap-parse-nstring)
+ 			      (or (eobp) (forward-char)))
+ 			    (prog1 (imap-parse-nstring)
+ 			      (or (eobp) (forward-char)))
+ 			    (prog1 (imap-parse-nstring)
+ 			      (or (eobp) (forward-char)))))
+       (when (eq (char-after) ?\))
+ 	(or (eobp) (forward-char))
+ 	address))))
+ 
+ ;;   address-list    = "(" 1*address ")" / nil
+ ;;
+ ;;   nil             = "NIL"
+ 
+ (defsubst imap-parse-address-list ()
+   (if (eq (char-after) ?\()
+       (let (address addresses)
+ 	(or (eobp) (forward-char))
+ 	(while (and (not (eq (char-after) ?\)))
+ 		    (setq address (imap-parse-address)))
+ 	  (setq addresses (cons address addresses)))
+ 	(when (eq (char-after) ?\))
+ 	  (or (eobp) (forward-char))
+ 	  (nreverse addresses)))
+     (assert (imap-parse-nil))))
+ 
  ;;   mailbox         = "INBOX" / astring
  ;;                       ; INBOX is case-insensitive.  All case variants of
  ;;                       ; INBOX (e.g. "iNbOx") MUST be interpreted as INBOX
***************
*** 1485,1491 ****
  ;;                       ; revisions of this specification.
  
  (defun imap-parse-flag-list ()
!   (let ((str (buffer-substring (point) (search-forward ")" nil t)))
  	pos)
      (while (setq pos (string-match "\\\\" str (and pos (+ 2 pos))))
        (setq str (replace-match "\\\\" nil t str)))
--- 1606,1613 ----
  ;;                       ; revisions of this specification.
  
  (defun imap-parse-flag-list ()
!   (let ((str (buffer-substring-no-properties
! 	      (point) (search-forward ")" nil t)))
  	pos)
      (while (setq pos (string-match "\\\\" str (and pos (+ 2 pos))))
        (setq str (replace-match "\\\\" nil t str)))
***************
*** 1516,1526 ****
  ;;   env-to          = "(" 1*address ")" / nil
  
  (defun imap-parse-envelope ()
!   ;; xxx: does not handle literals
!   (read (current-buffer)))
  
! ;;   body            = "(" body-type-1part / body-type-mpart ")"
! ;;
  ;;   body-extension  = nstring / number /
  ;;                      "(" body-extension *(SP body-extension) ")"
  ;;                       ; Future expansion.  Client implementations
--- 1638,1679 ----
  ;;   env-to          = "(" 1*address ")" / nil
  
  (defun imap-parse-envelope ()
!   (when (eq (char-after) ?\()
!     (or (eobp) (forward-char))
!     (vector (prog1 (imap-parse-nstring)      ;; date
! 	      (or (eobp) (forward-char)))
! 	    (prog1 (imap-parse-nstring)      ;; subject
! 	      (or (eobp) (forward-char)))
! 	    (prog1 (imap-parse-address-list) ;; from
! 	      (or (eobp) (forward-char)))
! 	    (prog1 (imap-parse-address-list) ;; sender
! 	      (or (eobp) (forward-char)))
! 	    (prog1 (imap-parse-address-list) ;; reply-to
! 	      (or (eobp) (forward-char)))
! 	    (prog1 (imap-parse-address-list) ;; to
! 	      (or (eobp) (forward-char)))
! 	    (prog1 (imap-parse-address-list) ;; cc
! 	      (or (eobp) (forward-char)))
! 	    (prog1 (imap-parse-address-list) ;; bcc
! 	      (or (eobp) (forward-char)))
! 	    (prog1 (imap-parse-nstring)      ;; in-reply-to
! 	      (or (eobp) (forward-char)))
! 	    (prog1 (imap-parse-nstring)      ;; message-id
! 	      (or (eobp) (forward-char))))))
  
! ;;   body-fld-param  = "(" string SP string *(SP string SP string) ")" / nil
! 
! (defsubst imap-parse-string-list ()
!   (cond ((eq (char-after) ?\()                      ;; body-fld-param
! 	 (let (strlist str)
! 	   (or (eobp) (forward-char))
! 	   (while (setq str (imap-parse-string))
! 	     (push str strlist)
! 	     (or (eobp) (forward-char)))
! 	   (nreverse strlist)))
! 	((imap-parse-nil)
! 	 nil)))
! 
  ;;   body-extension  = nstring / number /
  ;;                      "(" body-extension *(SP body-extension) ")"
  ;;                       ; Future expansion.  Client implementations
***************
*** 1529,1535 ****
--- 1682,1738 ----
  ;;                       ; body-extension fields except as defined by
  ;;                       ; future standard or standards-track
  ;;                       ; revisions of this specification.
+ 
+ (defun imap-parse-body-extension ()
+   (if (eq (char-after) ?\()
+       (let (b-e)
+ 	(or (eobp) (forward-char))
+ 	(push (imap-parse-body-extension) b-e)
+ 	(while (eq (char-after) ?\ )
+ 	  (or (eobp) (forward-char))
+ 	  (push (imap-parse-body-extension) b-e))
+ 	(assert (eq (char-after) ?\)))
+ 	(or (eobp) (forward-char))
+ 	(nreverse b-e))
+     (or (imap-parse-number)
+ 	(imap-parse-nstring))))
+ 
+ ;;   body-ext-1part  = body-fld-md5 [SP body-fld-dsp [SP body-fld-lang
+ ;;                     *(SP body-extension)]]
+ ;;                       ; MUST NOT be returned on non-extensible
+ ;;                       ; "BODY" fetch
  ;;
+ ;;   body-ext-mpart  = body-fld-param [SP body-fld-dsp [SP body-fld-lang
+ ;;                     *(SP body-extension)]]
+ ;;                       ; MUST NOT be returned on non-extensible
+ ;;                       ; "BODY" fetch
+ 
+ (defsubst imap-parse-body-ext ()
+   (let (ext)
+     (when (eq (char-after) ?\ )                   ;; body-fld-dsp
+       (or (eobp) (forward-char))
+       (let (dsp)
+ 	(if (eq (char-after) ?\()
+ 	    (progn
+ 	      (or (eobp) (forward-char))
+ 	      (push (imap-parse-string) dsp)
+ 	      (or (eobp) (forward-char))
+ 	      (push (imap-parse-string-list) dsp)
+ 	      (or (eobp) (forward-char)))
+ 	  (assert (imap-parse-nil)))
+ 	(push (nreverse dsp) ext))
+       (when (eq (char-after) ?\ )                ;; body-fld-lang
+ 	(or (eobp) (forward-char))
+ 	(if (eq (char-after) ?\()
+ 	    (push (imap-parse-string-list) ext)
+ 	  (push (imap-parse-nstring) ext))
+ 	(while (eq (char-after) ?\ )             ;; body-extension
+ 	  (or (eobp) (forward-char))
+ 	  (setq ext (append (imap-parse-body-extension) ext)))))
+     ext))
+ 
+ ;;   body            = "(" body-type-1part / body-type-mpart ")"
+ ;;
  ;;   body-ext-1part  = body-fld-md5 [SP body-fld-dsp [SP body-fld-lang
  ;;                     *(SP body-extension)]]
  ;;                       ; MUST NOT be returned on non-extensible
***************
*** 1568,1592 ****
  ;;   body-type-basic = media-basic SP body-fields
  ;;                       ; MESSAGE subtype MUST NOT be "RFC822"
  ;;
- ;;   body-type-mpart = 1*body SP media-subtype
- ;;                     [SP body-ext-mpart]
- ;;
  ;;   body-type-msg   = media-message SP body-fields SP envelope
  ;;                     SP body SP body-fld-lines
  ;;
  ;;   body-type-text  = media-text SP body-fields SP body-fld-lines
  ;;
! ;;   media-basic     = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" / "MESSAGE" /
! ;;                     "VIDEO") DQUOTE) / string) SP media-subtype
  ;;                       ; Defined in [MIME-IMT]
! 
! ;; ("TEXT" "PLAIN" ("CHARSET" "us-ascii") NIL NIL "7BIT" 7415 213)
! ;; (("TEXT" "PLAIN" ("CHARSET" "US-ASCII") NIL NIL "7BIT" 9 2)(("TEXT" "PLAIN" ("CHARSET" "US-ASCII") NIL NIL "7BIT" 8 2)("IMAGE" "GIF" NIL NIL NIL "BASE64" 2802) "ALTERNATIVE")("TEXT" "PLAIN" NIL NIL NIL "7BIT" 7 1) "MIXED")
! ;; (("IMAGE" "JPEG" NIL NIL NIL "BASE64" 1222)("TEXT" "PLAIN" ("CHARSET" "us-ascii") NIL NIL "7BIT" 2 1)(("TEXT" "PLAIN" ("CHARSET" "us-ascii") NIL NIL "7BIT" 21 2)("TEXT" "PLAIN" ("CHARSET" "us-ascii") NIL NIL "7BIT" 20 2)(("IMAGE" "JPEG" NIL NIL NIL "BASE64" 1222) "MIXED") "ALTERNATIVE")("TEXT" "PLAIN" ("CHARSET" "us-ascii") NIL NIL "7BIT" 111 5) "MIXED")
  
  (defun imap-parse-body ()
!   ;; xxx: does not handle literals
!   (read (current-buffer)))
  
  (when imap-debug ; (untrace-all)
    (require 'trace)
--- 1771,1858 ----
  ;;   body-type-basic = media-basic SP body-fields
  ;;                       ; MESSAGE subtype MUST NOT be "RFC822"
  ;;
  ;;   body-type-msg   = media-message SP body-fields SP envelope
  ;;                     SP body SP body-fld-lines
  ;;
  ;;   body-type-text  = media-text SP body-fields SP body-fld-lines
+ ;;
+ ;;   body-type-mpart = 1*body SP media-subtype
+ ;;                     [SP body-ext-mpart]
  ;;
! ;;   media-basic     = ((DQUOTE ("APPLICATION" / "AUDIO" / "IMAGE" /
! ;;                     "MESSAGE" / "VIDEO") DQUOTE) / string) SP media-subtype
  ;;                       ; Defined in [MIME-IMT]
! ;;
! ;;   media-message   = DQUOTE "MESSAGE" DQUOTE SP DQUOTE "RFC822" DQUOTE
! ;;                      ; Defined in [MIME-IMT]
! ;;
! ;;   media-subtype   = string
! ;;                       ; Defined in [MIME-IMT]
! ;;
! ;;   media-text      = DQUOTE "TEXT" DQUOTE SP media-subtype
! ;;                       ; Defined in [MIME-IMT]
  
  (defun imap-parse-body ()
!   (let (body)
!     (when (eq (char-after) ?\()
!       (or (eobp) (forward-char))
!       (if (eq (char-after) ?\()
! 	  (let (subbody)
! 	    (while (and (eq (char-after) ?\()
! 			(setq subbody (imap-parse-body)))
! 	      (push subbody body))
! 	    (or (eobp) (forward-char))
! 	    (push (imap-parse-string) body)               ;; media-subtype
! 	    (when (eq (char-after) ?\ )                   ;; body-ext-mpart:
! 	      (or (eobp) (forward-char))
! 	      (if (eq (char-after) ?\()                   ;; body-fld-param
! 		  (push (imap-parse-string-list) body)
! 		(push (and (imap-parse-nil) nil) body))
! 	      (setq body
! 		    (append (imap-parse-body-ext) body))) ;; body-ext-...
! 	    (assert (eq (char-after) ?\)))
! 	    (or (eobp) (forward-char))
! 	    (nreverse body))
! 
! 	(push (imap-parse-string) body)                   ;; media-type
! 	(or (eobp) (forward-char))
! 	(push (imap-parse-string) body)                   ;; media-subtype
! 	(or (eobp) (forward-char))
! 	(if (eq (char-after) ?\()                         ;; body-fld-param
! 	    (push (imap-parse-string-list) body)
! 	  (push (and (imap-parse-nil) nil) body))
! 	(or (eobp) (forward-char))
! 	(push (imap-parse-nstring) body)                  ;; body-fld-id
! 	(or (eobp) (forward-char))
! 	(push (imap-parse-nstring) body)                  ;; body-fld-desc
! 	(or (eobp) (forward-char))
! 	(push (imap-parse-string) body)                   ;; body-fld-enc
! 	(or (eobp) (forward-char))
! 	(push (imap-parse-number) body)                   ;; body-fld-octets
! 
! 	(when (eq (char-after) ?\ )
! 	  (or (eobp) (forward-char))
! 	  (let (lines md5)
! 	    (cond ((eq (char-after) ?\()                  ;; body-type-msg:
! 		   (push (imap-parse-envelope) body)      ;; envelope
! 		   (or (eobp) (forward-char))
! 		   (push (imap-parse-body) body)          ;; body
! 		   (or (eobp) (forward-char))
! 		   (push (imap-parse-number) body)        ;; body-fld-lines
! 		   (or (eobp) (forward-char)))
! 		  ((setq lines (imap-parse-number))       ;; body-type-text:
! 		   (push lines body)                      ;; body-fld-lines
! 		   (or (eobp) (forward-char))))
! 	  
! 	    (when (or (imap-parse-nil)
! 		      (setq md5 (imap-parse-nstring)))    ;; body-ext-1part:
! 	      (push md5 body)                             ;; body-fld-md5
! 	      (setq body (append (imap-parse-body-ext)
! 				 body)))))                ;; body-ext-1part..
! 
! 	(assert (eq (char-after) ?\)))
! 	(or (eobp) (forward-char))
! 	(nreverse body)))))
  
  (when imap-debug ; (untrace-all)
    (require 'trace)
Index: nnimap/nnimap.el
diff -c nnimap/nnimap.el:1.132 nnimap/nnimap.el:1.135
*** nnimap/nnimap.el:1.132	Tue Mar 16 12:25:31 1999
--- nnimap/nnimap.el	Fri Mar 26 13:45:27 1999
***************
*** 93,99 ****
  
  (nnoo-declare nnimap)
  
! (defconst nnimap-version "nnimap 0.94")
  
  ;; Splitting variables
  
--- 93,99 ----
  
  (nnoo-declare nnimap)
  
! (defconst nnimap-version "nnimap 0.95")
  
  ;; Splitting variables
  
***************
*** 512,519 ****
  
  ;; (nn)IMAP specific decisions:
  ;;
! ;; o deletion of reply-marks is prohibited
! ;; o dormant articles are also marked as ticked
  ;;
  ;; action looks like:
  ;;   (((1 . 10) 'set '(read ticked))
--- 512,518 ----
  
  ;; (nn)IMAP specific decisions:
  ;;
! ;; o dormant articles are also marked as ticked (for other imap clients)
  ;;
  ;; action looks like:
  ;;   (((1 . 10) 'set '(read ticked))
***************
*** 528,549 ****
  	(while (setq action (pop actions))
  	  (let ((range (nth 0 action))
  		(what  (nth 1 action))
! 		(pred  (nth 2 action)))
! 	    ;; enforce local decisions
! 	    (if (eq what 'del)
! 		(setq pred (delq 'reply pred)))
! 	    (if (memq 'dormant pred)
! 		(setq pred (cons 'tick pred)))
! 	    (when (and range pred)
  	      (cond ((eq what 'del)
! 		     (imap-message-flags-del (nnimap-range-to-string range)
! 					   (nnimap-mark-to-flag pred nil t)))
  		    ((eq what 'add)
! 		     (imap-message-flags-add (nnimap-range-to-string range)
! 					   (nnimap-mark-to-flag pred nil t)))
  		    ((eq what 'set)
! 		     (imap-message-flags-set (nnimap-range-to-string range)
! 					   (nnimap-mark-to-flag pred nil t)))))))
  	(gnus-message 7 "Setting marks in %s:%s...done" 
  		      (nnoo-current-server 'nnimap) group)))))
  
--- 527,556 ----
  	(while (setq action (pop actions))
  	  (let ((range (nth 0 action))
  		(what  (nth 1 action))
! 		(cmdmarks (nth 2 action))
! 		marks)
! 	    ;; flag dormant articles as ticked
! 	    (if (memq 'dormant cmdmarks)
! 		(setq cmdmarks (cons 'tick cmdmarks)))
! 	    ;; remove stuff we are forbidden to store
! 	    (mapcar (lambda (mark)
! 		      (if (imap-message-flag-permanent-p
! 			   (nnimap-mark-to-flag mark))
! 			  (setq marks (cons mark marks))))
! 		    cmdmarks)
! 	    (when (and range marks)
  	      (cond ((eq what 'del)
! 		     (imap-message-flags-del
! 		      (nnimap-range-to-string range)
! 		      (nnimap-mark-to-flag marks nil t)))
  		    ((eq what 'add)
! 		     (imap-message-flags-add 
! 		      (nnimap-range-to-string range)
! 		      (nnimap-mark-to-flag marks nil t)))
  		    ((eq what 'set)
! 		     (imap-message-flags-set
! 		      (nnimap-range-to-string range)
! 		      (nnimap-mark-to-flag marks nil t)))))))
  	(gnus-message 7 "Setting marks in %s:%s...done" 
  		      (nnoo-current-server 'nnimap) group)))))
  
***************
*** 987,994 ****
        (list ms ls))))
  
  (defun nnimap-date-days-ago (daysago)
!   "Return date, in format \"3-Aug-98\", for DAYSAGO days ago."
!   (let ((date (format-time-string "%d-%b-%y" 
  				  (nnimap-time-substract
  				   (current-time)
  				   (if (fboundp 'days-to-time)
--- 994,1001 ----
        (list ms ls))))
  
  (defun nnimap-date-days-ago (daysago)
!   "Return date, in format \"3-Aug-1998\", for DAYSAGO days ago."
!   (let ((date (format-time-string "%d-%b-%Y" 
  				  (nnimap-time-substract
  				   (current-time)
  				   (if (fboundp 'days-to-time)
***************
*** 1145,1154 ****
  (defun nnimap-mark-permanent-p (mark &optional group)
    "Return t iff MARK can be permanently (between IMAP sessions) saved
  on articles, in GROUP."
!   (with-current-buffer nnimap-server-buffer
!     (or (member "\\*" (imap-mailbox-get 'permanentflags group))
! 	(member (nnimap-mark-to-flag mark) (imap-mailbox-get 'permanentflags
! 							    group)))))
  
  (eval-and-compile  
    (if (not (fboundp 'remassoc))
--- 1152,1158 ----
  (defun nnimap-mark-permanent-p (mark &optional group)
    "Return t iff MARK can be permanently (between IMAP sessions) saved
  on articles, in GROUP."
!   (imap-message-flag-permanent-p (nnimap-mark-to-flag mark)))
  
  (eval-and-compile  
    (if (not (fboundp 'remassoc))