*** dist/vm-delete.el.dist Tue Dec 12 00:11:08 2000 --- vm-delete.el Sun Dec 2 17:16:46 2001 *************** *** 200,202 **** ! (defun vm-expunge-folder (&optional shaddap) "Expunge messages with the `deleted' attribute. --- 200,203 ---- ! (defun vm-expunge-folder (&optional shaddap just-these-messages ! messages-to-expunge) "Expunge messages with the `deleted' attribute. *************** *** 224,226 **** (message "Expunging...")) ! (let ((use-marks (eq last-command 'vm-next-command-uses-marks)) (mp vm-message-list) --- 225,228 ---- (message "Expunging...")) ! (let ((use-marks (and (eq last-command 'vm-next-command-uses-marks) ! (null just-these-messages))) (mp vm-message-list) *************** *** 231,235 **** (cond ! ((and (vm-deleted-flag (car mp)) ! (or (not use-marks) ! (vm-mark-of (car mp)))) ;; remove the message from the thread tree. --- 233,239 ---- (cond ! ((if just-these-messages ! (memq (car mp) messages-to-expunge) ! (and (vm-deleted-flag (car mp)) ! (or (not use-marks) ! (vm-mark-of (car mp))))) ;; remove the message from the thread tree. *************** *** 322,323 **** --- 326,344 ---- (set-buffer (vm-buffer-of (vm-real-message-of (car mp)))) + (cond ((eq vm-folder-access-method 'pop) + (setq vm-pop-messages-to-expunge + (cons (vm-pop-uidl-of (vm-real-message-of (car mp))) + vm-pop-messages-to-expunge) + ;; Set this so that if Emacs crashes or + ;; the user quites without saving, we + ;; have a record of messages that were + ;; retrieved and expunged locally. + ;; When the user does M-x recover-file + ;; we won't re-retrieve messages the + ;; user has already deal with. + vm-pop-retrieved-messages + (cons (list (vm-pop-uidl-of + (vm-real-message-of (car mp))) + (vm-folder-pop-maildrop-spec) + 'uidl) + vm-pop-retrieved-messages)))) (vm-increment vm-modification-counter) *** dist/vm-folder.el.dist Sun Nov 18 23:57:24 2001 --- vm-folder.el Sun Dec 2 18:50:19 2001 *************** *** 937,938 **** --- 937,939 ---- (vm-set-message-type-of message vm-folder-type) + (vm-set-message-access-method-of message vm-folder-access-method) (vm-set-start-of message (vm-marker (point))) *************** *** 1906,1908 **** (defun vm-stuff-labels () ! (if vm-message-pointer (save-excursion --- 1907,1909 ---- (defun vm-stuff-labels () ! (if vm-message-list (save-excursion *************** *** 1964,1966 **** (defun vm-stuff-bookmark () ! (if vm-message-pointer (save-excursion --- 1965,1967 ---- (defun vm-stuff-bookmark () ! (if vm-message-list (save-excursion *************** *** 2006,2008 **** (defun vm-stuff-last-modified () ! (if vm-message-pointer (save-excursion --- 2007,2009 ---- (defun vm-stuff-last-modified () ! (if vm-message-list (save-excursion *************** *** 2048,2050 **** (defun vm-stuff-pop-retrieved () ! (if vm-message-pointer (save-excursion --- 2049,2051 ---- (defun vm-stuff-pop-retrieved () ! (if vm-message-list (save-excursion *************** *** 2100,2102 **** (defun vm-stuff-imap-retrieved () ! (if vm-message-pointer (save-excursion --- 2101,2103 ---- (defun vm-stuff-imap-retrieved () ! (if vm-message-list (save-excursion *************** *** 2153,2155 **** (defun vm-stuff-summary () ! (if vm-message-pointer (save-excursion --- 2154,2156 ---- (defun vm-stuff-summary () ! (if vm-message-list (save-excursion *************** *** 2199,2201 **** (defun vm-stuff-header-variables () ! (if vm-message-pointer (save-excursion --- 2200,2202 ---- (defun vm-stuff-header-variables () ! (if vm-message-list (save-excursion *************** *** 2961,2963 **** (setq found-one t) ! (not (and (not (buffer-modified-p)) buffer-file-name --- 2962,2967 ---- (setq found-one t) ! (not vm-global-block-new-mail) ! (not vm-block-new-mail) ! (not vm-folder-read-only) ! (not (and (not (buffer-modified-p)) buffer-file-name *************** *** 2966,2971 **** buffer-file-name))) ! (not vm-global-block-new-mail) ! (not vm-folder-read-only) ! (vm-get-spooled-mail nil) ! (vm-assimilate-new-messages t)) (progn --- 2970,2972 ---- buffer-file-name))) ! (vm-get-spooled-mail nil)) (progn *************** *** 3123,3124 **** --- 3124,3127 ---- (let (mp (newlist nil)) + (cond ((eq vm-folder-access-method 'pop) + (vm-pop-synchronize-folder t t t nil))) ;; stuff the attributes of messages that need it. *************** *** 3145,3147 **** ;; clear the modified flag in virtual folders if all the ! ;; real buffers assocaited with them are unmodified. (let ((b-list vm-virtual-buffers) rb-list one-modified) --- 3148,3150 ---- ;; clear the modified flag in virtual folders if all the ! ;; real buffers associated with them are unmodified. (let ((b-list vm-virtual-buffers) rb-list one-modified) *************** *** 3215,3217 **** (setq vm-block-new-mail t)) ! (vm buffer-file-name)) --- 3218,3222 ---- (setq vm-block-new-mail t)) ! (let ((name (cond ((eq vm-folder-access-method 'pop) ! (vm-pop-find-name-for-buffer (current-buffer)))))) ! (vm (or name buffer-file-name) nil vm-folder-access-method))) *************** *** 3222,3225 **** (eq major-mode 'vm-mode) ! vm-message-list ! (= (vm-end-of (car vm-message-list)) 1)) (vm-handle-file-recovery-or-reversion t))) --- 3227,3230 ---- (eq major-mode 'vm-mode) ! (or (null vm-message-list) ! (= (vm-end-of (car vm-message-list)) 1))) (vm-handle-file-recovery-or-reversion t))) *************** *** 3231,3234 **** (eq major-mode 'vm-mode) ! vm-message-list ! (= (vm-end-of (car vm-message-list)) 1)) (vm-handle-file-recovery-or-reversion nil))) --- 3236,3239 ---- (eq major-mode 'vm-mode) ! (or (null vm-message-list) ! (= (vm-end-of (car vm-message-list)) 1))) (vm-handle-file-recovery-or-reversion nil))) *************** *** 3515,3562 **** nil ! (let ((triples (vm-compute-spool-files (not this-buffer-only))) ! ;; since we could accept-process-output here (POP code), ! ;; a timer process might try to start retrieving mail ! ;; before we finish. block these attempts. ! (vm-global-block-new-mail t) ! (vm-pop-ok-to-ask interactive) ! (vm-imap-ok-to-ask interactive) ! ;; for string-match calls below ! (case-fold-search nil) ! this-buffer crash in maildrop meth ! (mail-waiting nil)) ! (while triples ! (setq in (expand-file-name (nth 0 (car triples)) vm-folder-directory) ! maildrop (nth 1 (car triples)) ! crash (nth 2 (car triples))) ! (if (vm-movemail-specific-spool-file-p maildrop) ! ;; spool file is accessible only with movemail ! ;; so skip it. ! nil ! (setq this-buffer (eq (current-buffer) (vm-get-file-buffer in))) ! (if (or this-buffer (not this-buffer-only)) ! (progn ! (if (file-exists-p crash) ! (progn ! (setq mail-waiting t)) ! (cond ((and vm-recognize-imap-maildrops ! (string-match vm-recognize-imap-maildrops ! maildrop)) ! (setq meth 'vm-imap-check-mail)) ! ((and vm-recognize-pop-maildrops ! (string-match vm-recognize-pop-maildrops ! maildrop)) ! (setq meth 'vm-pop-check-mail)) ! (t (setq meth 'vm-spool-check-mail))) ! (if (not interactive) ! ;; allow no error to be signaled ! (condition-case nil ! (setq mail-waiting ! (or mail-waiting ! (funcall meth maildrop))) ! (error nil)) ! (setq mail-waiting ! (or mail-waiting ! (funcall meth maildrop)))))))) ! (setq triples (cdr triples))) ! mail-waiting ))) --- 3520,3570 ---- nil ! (if (and vm-folder-access-method this-buffer-only) ! (cond ((eq vm-folder-access-method 'pop) ! (vm-pop-folder-check-for-mail interactive))) ! (let ((triples (vm-compute-spool-files (not this-buffer-only))) ! ;; since we could accept-process-output here (POP code), ! ;; a timer process might try to start retrieving mail ! ;; before we finish. block these attempts. ! (vm-global-block-new-mail t) ! (vm-pop-ok-to-ask interactive) ! (vm-imap-ok-to-ask interactive) ! ;; for string-match calls below ! (case-fold-search nil) ! this-buffer crash in maildrop meth ! (mail-waiting nil)) ! (while triples ! (setq in (expand-file-name (nth 0 (car triples)) vm-folder-directory) ! maildrop (nth 1 (car triples)) ! crash (nth 2 (car triples))) ! (if (vm-movemail-specific-spool-file-p maildrop) ! ;; spool file is accessible only with movemail ! ;; so skip it. ! nil ! (setq this-buffer (eq (current-buffer) (vm-get-file-buffer in))) ! (if (or this-buffer (not this-buffer-only)) ! (progn ! (if (file-exists-p crash) ! (progn ! (setq mail-waiting t)) ! (cond ((and vm-recognize-imap-maildrops ! (string-match vm-recognize-imap-maildrops ! maildrop)) ! (setq meth 'vm-imap-check-mail)) ! ((and vm-recognize-pop-maildrops ! (string-match vm-recognize-pop-maildrops ! maildrop)) ! (setq meth 'vm-pop-check-mail)) ! (t (setq meth 'vm-spool-check-mail))) ! (if (not interactive) ! ;; allow no error to be signaled ! (condition-case nil ! (setq mail-waiting ! (or mail-waiting ! (funcall meth maildrop))) ! (error nil)) ! (setq mail-waiting ! (or mail-waiting ! (funcall meth maildrop)))))))) ! (setq triples (cdr triples))) ! mail-waiting )))) *************** *** 3565,3566 **** --- 3573,3579 ---- (error "Can't get new mail until you save this folder.")) + (cond ((eq vm-folder-access-method 'pop) + (vm-pop-synchronize-folder interactive nil nil t)) + (t (vm-get-spooled-mail-normal interactive)))) + + (defun vm-get-spooled-mail-normal (&optional interactive) (if vm-global-block-new-mail *************** *** 3659,3661 **** (if (not non-file-maildrop) ! (vm-store-folder-totals maildrop '(0 0 0 0))) (message "Got mail from %s." --- 3672,3675 ---- (if (not non-file-maildrop) ! (vm-store-folder-totals maildrop ! '(0 0 0 0))) (message "Got mail from %s." *************** *** 3669,3671 **** (run-hooks 'vm-retrieved-spooled-mail-hook)) ! got-mail )))) --- 3683,3685 ---- (run-hooks 'vm-retrieved-spooled-mail-hook)) ! (and got-mail (vm-assimilate-new-messages t)))))) *************** *** 3719,3721 **** (let (totals-blurb) ! (if (and (vm-get-spooled-mail t) (vm-assimilate-new-messages t)) (progn --- 3733,3735 ---- (let (totals-blurb) ! (if (vm-get-spooled-mail t) (progn *************** *** 3821,3823 **** ;; add the labels ! (if (and labels vm-burst-digest-messages-inherit-labels) (let ((mp new-messages)) --- 3835,3837 ---- ;; add the labels ! (if (and new-messages labels vm-burst-digest-messages-inherit-labels) (let ((mp new-messages)) *************** *** 3826,3828 **** (setq mp (cdr mp))))) ! (if vm-summary-show-threads (progn --- 3840,3842 ---- (setq mp (cdr mp))))) ! (if (and new-messages vm-summary-show-threads) (progn *************** *** 3833,3836 **** (vm-sort-messages "thread"))) ! (if (and (or vm-arrived-message-hook vm-arrived-messages-hook) ! new-messages ;; Run the hooks only if this is not the first --- 3847,3850 ---- (vm-sort-messages "thread"))) ! (if (and new-messages ! (or vm-arrived-message-hook vm-arrived-messages-hook) ;; Run the hooks only if this is not the first *************** *** 3924,3926 **** ;; this does the real major mode scutwork. ! (defun vm-mode-internal () (widen) --- 3938,3940 ---- ;; this does the real major mode scutwork. ! (defun vm-mode-internal (&optional access-method) (widen) *************** *** 3967,3968 **** --- 3981,3985 ---- vm-folder-type (vm-get-folder-type)) + (cond ((eq access-method 'pop) + (setq vm-folder-access-method 'pop + vm-folder-access-data (make-vector 2 nil)))) (use-local-map vm-mode-map) *** dist/vm-imap.el.dist Sun Oct 28 22:13:04 2001 --- vm-imap.el Sun Dec 2 22:59:13 2001 *************** *** 603,629 **** (defun vm-imap-stat-timer (o) (aref o 0)) ! (defun vm-imap-stat-x-box (o) (aref o 1)) ! (defun vm-imap-stat-x-currmsg (o) (aref o 2)) ! (defun vm-imap-stat-x-maxmsg (o) (aref o 3)) ! (defun vm-imap-stat-x-got (o) (aref o 4)) ! (defun vm-imap-stat-x-need (o) (aref o 5)) ! (defun vm-imap-stat-y-box (o) (aref o 6)) ! (defun vm-imap-stat-y-currmsg (o) (aref o 7)) ! (defun vm-imap-stat-y-maxmsg (o) (aref o 8)) ! (defun vm-imap-stat-y-got (o) (aref o 9)) ! (defun vm-imap-stat-y-need (o) (aref o 10)) (defun vm-set-imap-stat-timer (o val) (aset o 0 val)) ! (defun vm-set-imap-stat-x-box (o val) (aset o 1 val)) ! (defun vm-set-imap-stat-x-currmsg (o val) (aset o 2 val)) ! (defun vm-set-imap-stat-x-maxmsg (o val) (aset o 3 val)) ! (defun vm-set-imap-stat-x-got (o val) (aset o 4 val)) ! (defun vm-set-imap-stat-x-need (o val) (aset o 5 val)) ! (defun vm-set-imap-stat-y-box (o val) (aset o 6 val)) ! (defun vm-set-imap-stat-y-currmsg (o val) (aset o 7 val)) ! (defun vm-set-imap-stat-y-maxmsg (o val) (aset o 8 val)) ! (defun vm-set-imap-stat-y-got (o val) (aset o 9 val)) ! (defun vm-set-imap-stat-y-need (o val) (aset o 10 val)) (defun vm-imap-start-status-timer () ! (let ((blob (make-vector 11 nil)) timer) --- 603,631 ---- (defun vm-imap-stat-timer (o) (aref o 0)) ! (defun vm-imap-stat-did-report (o) (aref o 1)) ! (defun vm-imap-stat-x-box (o) (aref o 2)) ! (defun vm-imap-stat-x-currmsg (o) (aref o 3)) ! (defun vm-imap-stat-x-maxmsg (o) (aref o 4)) ! (defun vm-imap-stat-x-got (o) (aref o 5)) ! (defun vm-imap-stat-x-need (o) (aref o 6)) ! (defun vm-imap-stat-y-box (o) (aref o 7)) ! (defun vm-imap-stat-y-currmsg (o) (aref o 8)) ! (defun vm-imap-stat-y-maxmsg (o) (aref o 9)) ! (defun vm-imap-stat-y-got (o) (aref o 10)) ! (defun vm-imap-stat-y-need (o) (aref o 11)) (defun vm-set-imap-stat-timer (o val) (aset o 0 val)) ! (defun vm-set-imap-stat-did-report (o val) (aset o 1 val)) ! (defun vm-set-imap-stat-x-box (o val) (aset o 2 val)) ! (defun vm-set-imap-stat-x-currmsg (o val) (aset o 3 val)) ! (defun vm-set-imap-stat-x-maxmsg (o val) (aset o 4 val)) ! (defun vm-set-imap-stat-x-got (o val) (aset o 5 val)) ! (defun vm-set-imap-stat-x-need (o val) (aset o 6 val)) ! (defun vm-set-imap-stat-y-box (o val) (aset o 7 val)) ! (defun vm-set-imap-stat-y-currmsg (o val) (aset o 8 val)) ! (defun vm-set-imap-stat-y-maxmsg (o val) (aset o 9 val)) ! (defun vm-set-imap-stat-y-got (o val) (aset o 10 val)) ! (defun vm-set-imap-stat-y-need (o val) (aset o 11 val)) (defun vm-imap-start-status-timer () ! (let ((blob (make-vector 12 nil)) timer) *************** *** 634,635 **** --- 636,639 ---- (defun vm-imap-stop-status-timer (status-blob) + (if (vm-imap-stat-did-report status-blob) + (message "")) (if (fboundp 'disable-timeout) *************** *** 639,640 **** --- 643,645 ---- (defun vm-imap-report-retrieval-status (o) + (vm-set-imap-stat-did-report o t) (cond ((null (vm-imap-stat-x-got o)) t) *************** *** 647,662 **** (vm-imap-stat-x-box o) ! (format "%d%s of %d%s" ! (vm-imap-stat-x-got o) ! (if (> (vm-imap-stat-x-got o) ! (vm-imap-stat-x-need o)) ! "!" ! "") ! (vm-imap-stat-x-need o) ! (if (eq (vm-imap-stat-x-got o) ! (vm-imap-stat-y-got o)) ! (cond ((>= (vm-imap-stat-x-got o) ! (vm-imap-stat-x-need o)) ! "(post processing)") ! (t " (stalled)")) ! ""))))) (vm-set-imap-stat-y-box o (vm-imap-stat-x-box o)) --- 652,666 ---- (vm-imap-stat-x-box o) ! (if (vm-imap-stat-x-need o) ! (format "%d%s of %d%s" ! (vm-imap-stat-x-got o) ! (if (> (vm-imap-stat-x-got o) ! (vm-imap-stat-x-need o)) ! "!" ! "") ! (vm-imap-stat-x-need o) ! (if (eq (vm-imap-stat-x-got o) ! (vm-imap-stat-y-got o)) ! " (stalled)" ! "")) ! "post processing")))) (vm-set-imap-stat-y-box o (vm-imap-stat-x-box o)) *************** *** 847,849 **** (setq vm-imap-read-point (point-marker)) - (vm-set-imap-stat-x-got statblob nil) (setq list (cdr (nth 3 fetch-response))) --- 851,852 ---- *************** *** 864,865 **** --- 867,869 ---- (setq end (point-marker)) + (vm-set-imap-stat-x-need statblob nil) (vm-imap-cleanup-region start end) *************** *** 867,868 **** --- 871,873 ---- (goto-char start) + (vm-set-imap-stat-x-got statblob nil) ;; avoid the consing and stat() call for all but babyl *** dist/vm-message.el.dist Wed Feb 18 19:11:44 1998 --- vm-message.el Thu Nov 29 12:33:07 2001 *************** *** 90,91 **** --- 90,93 ---- (list 'aref (list 'aref message 1) 18)) + (defmacro vm-message-access-method (message) + (list 'aref (list 'aref message 1) 19)) ;; message attribute vector *************** *** 152,153 **** --- 154,166 ---- (list 'aref (list 'aref message 3) 20)) + ;; have we retrieved the headers of this message? + ;; only valid for remote folder access methods + (defmacro vm-retrieved-headers-of (message) + (list 'aref (list 'aref message 3) 21)) + ;; have we retrieved the body of this message? + ;; only valid for remote folder access methods + (defmacro vm-retrieved-body-of (message) + (list 'aref (list 'aref message 3) 22)) + ;; pop UIDL value for message + (defmacro vm-pop-uidl-of (message) + (list 'aref (list 'aref message 3) 23)) ;; extra data shared by virtual messages if vm-virtual-mirror is non-nil *************** *** 222,223 **** --- 235,238 ---- (list 'aset (list 'aref message 1) 18 overlay)) + (defmacro vm-set-message-access-method-of (message method) + (list 'aset (list 'aref message 1) 19 method)) (defmacro vm-set-attributes-of (message attrs) (list 'aset message 2 attrs)) *************** *** 275,276 **** --- 290,297 ---- (list 'aset (list 'aref message 3) 20 val)) + (defmacro vm-set-retrieved-header-of (message val) + (list 'aset (list 'aref message 3) 21 val)) + (defmacro vm-set-retrieved-body-of (message val) + (list 'aset (list 'aref message 3) 22 val)) + (defmacro vm-set-pop-uidl-of (message val) + (list 'aset (list 'aref message 3) 23 val)) (defmacro vm-set-mirror-data-of (message data) *** dist/vm-menu.el.dist Mon Jul 9 12:01:47 2001 --- vm-menu.el Sun Dec 2 18:36:32 2001 *************** *** 70,71 **** --- 70,72 ---- ["Visit Folder" vm-visit-folder t] + ["Visit POP Folder" vm-visit-pop-folder t] ["Revert Folder (back to disk version)" revert-buffer (vm-menu-can-revert-p)] *************** *** 1075,1077 **** (menu nil) ! tail spool-files --- 1076,1078 ---- (menu nil) ! tail foo spool-files *************** *** 1081,1087 **** (while (and folders (< i 10)) ! (setq menu (cons (vector " " ! (list 'vm-menu-run-command ! ''vm-visit-folder (car folders)) ! t ! (car folders)) menu) --- 1082,1098 ---- (while (and folders (< i 10)) ! (setq menu (cons ! (vector " " ! (cond ! ((and (stringp vm-recognize-pop-maildrops) ! (string-match vm-recognize-pop-maildrops ! (car folders)) ! (setq foo (vm-pop-find-name-for-spec ! (car folders)))) ! (list 'vm-menu-run-command ! ''vm-visit-pop-folder foo)) ! (t ! (list 'vm-menu-run-command ! ''vm-visit-folder (car folders)))) ! t ! (car folders)) menu) *** dist/vm-mime.el.dist Sun Nov 25 22:09:20 2001 --- vm-mime.el Sun Dec 2 22:13:38 2001 *************** *** 2510,2511 **** --- 2510,2512 ---- (bobp) + (= (point) (vm-text-of (vm-mm-layout-message layout))) (map-extents 'extent-property nil (1- (point)) (point) *************** *** 2833,2836 **** (goto-char (point-min)) ! (or (search-forward file nil t) ! (error "file name missing from 'identify' output: %s" (buffer-string))) --- 2834,2837 ---- (goto-char (point-min)) ! (or (search-forward " " nil t) ! (error "no spaces in 'identify' output: %s" (buffer-string))) *************** *** 2995,2997 **** ':ascent 50)) ! (setq value (make-face (make-symbol ""))) (set-face-stipple value (car strips))) --- 2996,2998 ---- ':ascent 50)) ! (setq value (make-face (make-symbol ""))) (set-face-stipple value (car strips))) *************** *** 3083,3085 **** ':ascent 50)) ! (setq value (make-face (make-symbol ""))) (set-face-stipple value (car sss))) --- 3084,3087 ---- ':ascent 50)) ! (setq value (make-face (make-symbol ! ""))) (set-face-stipple value (car sss))) *** dist/vm-pop.el.dist Sun Oct 28 22:13:04 2001 --- vm-pop.el Sun Dec 2 22:59:03 2001 *************** *** 31,32 **** --- 31,42 ---- + (defsubst vm-folder-pop-maildrop-spec () + (aref vm-folder-access-data 0)) + (defsubst vm-folder-pop-process () + (aref vm-folder-access-data 1)) + + (defsubst vm-set-folder-pop-maildrop-spec (val) + (aset vm-folder-access-data 0 val)) + (defsubst vm-set-folder-pop-process (val) + (aset vm-folder-access-data 1 val)) + ;; Our goal is to drag the mail from the POP maildrop to the crash box. *************** *** 38,40 **** (let ((process nil) - (folder-type vm-folder-type) (m-per-session vm-pop-messages-per-session) --- 48,49 ---- *************** *** 70,72 **** (set-buffer process-buffer) - (setq vm-folder-type (or folder-type vm-default-folder-type)) ;; find out how many messages are in the box. --- 79,80 ---- *************** *** 156,159 **** (throw 'done (not (equal retrieved 0)))) ! (and (null (vm-pop-retrieve-to-crashbox process destination ! statblob)) (throw 'done (not (equal retrieved 0)))) --- 164,167 ---- (throw 'done (not (equal retrieved 0)))) ! (and (null (vm-pop-retrieve-to-target process destination ! statblob)) (throw 'done (not (equal retrieved 0)))) *************** *** 252,253 **** --- 260,263 ---- (setq vm-pop-retrieved-messages + (delq nil vm-pop-retrieved-messages)) + (setq vm-pop-retrieved-messages (sort vm-pop-retrieved-messages *************** *** 301,302 **** --- 311,313 ---- (signal 'vm-dele-failed nil)) + (setcar mp nil) (vm-increment delete-count))) *************** *** 339,341 **** (and process (vm-pop-end-session process))) ! (or trouble (setq vm-pop-retrieved-messages nil)))) --- 350,353 ---- (and process (vm-pop-end-session process))) ! (setq vm-pop-retrieved-messages ! (delq nil vm-pop-retrieved-messages)))) *************** *** 344,345 **** --- 356,358 ---- process + (folder-type vm-folder-type) (popdrop (vm-safe-popdrop-string source)) *************** *** 421,422 **** --- 434,436 ---- (set-buffer process-buffer) + (setq vm-folder-type (or folder-type vm-default-folder-type)) (buffer-disable-undo process-buffer) *************** *** 515,570 **** (defun vm-pop-end-session (process &optional keep-buffer verbose) ! (save-excursion ! (set-buffer (process-buffer process)) ! (vm-pop-send-command process "QUIT") ! ;; Previously we did not read the QUIT response because of ! ;; TCP shutdown problems (under Windows?) that made it ! ;; better if we just closed the connection. Microsoft ! ;; Exchange apparently fails to expunge messages if we shut ! ;; down the connection without reading the QUIT response. ! ;; So we provide an option and let the user decide what ! ;; works best for them. ! (if vm-pop-read-quit-response ! (progn ! (and verbose ! (message "Waiting for response to POP QUIT command...")) ! (vm-pop-read-response process) ! (and verbose ! (message "Waiting for response to POP QUIT command... done")))) ! (if (not keep-buffer) ! (kill-buffer (process-buffer process)) (save-excursion ! (set-buffer (process-buffer process)) ! (rename-buffer (concat "saved " (buffer-name)) t) ! (vm-keep-some-buffers (current-buffer) 'vm-kept-pop-buffers ! vm-pop-keep-failed-trace-buffers))) ! (if (fboundp 'add-async-timeout) ! (add-async-timeout 2 'delete-process process) ! (run-at-time 2 nil 'delete-process process)))) (defun vm-pop-stat-timer (o) (aref o 0)) ! (defun vm-pop-stat-x-box (o) (aref o 1)) ! (defun vm-pop-stat-x-currmsg (o) (aref o 2)) ! (defun vm-pop-stat-x-maxmsg (o) (aref o 3)) ! (defun vm-pop-stat-x-got (o) (aref o 4)) ! (defun vm-pop-stat-x-need (o) (aref o 5)) ! (defun vm-pop-stat-y-box (o) (aref o 6)) ! (defun vm-pop-stat-y-currmsg (o) (aref o 7)) ! (defun vm-pop-stat-y-maxmsg (o) (aref o 8)) ! (defun vm-pop-stat-y-got (o) (aref o 9)) ! (defun vm-pop-stat-y-need (o) (aref o 10)) (defun vm-set-pop-stat-timer (o val) (aset o 0 val)) ! (defun vm-set-pop-stat-x-box (o val) (aset o 1 val)) ! (defun vm-set-pop-stat-x-currmsg (o val) (aset o 2 val)) ! (defun vm-set-pop-stat-x-maxmsg (o val) (aset o 3 val)) ! (defun vm-set-pop-stat-x-got (o val) (aset o 4 val)) ! (defun vm-set-pop-stat-x-need (o val) (aset o 5 val)) ! (defun vm-set-pop-stat-y-box (o val) (aset o 6 val)) ! (defun vm-set-pop-stat-y-currmsg (o val) (aset o 7 val)) ! (defun vm-set-pop-stat-y-maxmsg (o val) (aset o 8 val)) ! (defun vm-set-pop-stat-y-got (o val) (aset o 9 val)) ! (defun vm-set-pop-stat-y-need (o val) (aset o 10 val)) (defun vm-pop-start-status-timer () ! (let ((blob (make-vector 11 nil)) timer) --- 529,590 ---- (defun vm-pop-end-session (process &optional keep-buffer verbose) ! (if (and (memq (process-status process) '(open run)) ! (buffer-live-p (process-buffer process))) (save-excursion ! (set-buffer (process-buffer process)) ! (vm-pop-send-command process "QUIT") ! ;; Previously we did not read the QUIT response because of ! ;; TCP shutdown problems (under Windows?) that made it ! ;; better if we just closed the connection. Microsoft ! ;; Exchange apparently fails to expunge messages if we shut ! ;; down the connection without reading the QUIT response. ! ;; So we provide an option and let the user decide what ! ;; works best for them. ! (if vm-pop-read-quit-response ! (progn ! (and verbose ! (message "Waiting for response to POP QUIT command...")) ! (vm-pop-read-response process) ! (and verbose ! (message ! "Waiting for response to POP QUIT command... done")))))) ! (if (not keep-buffer) ! (if (buffer-live-p (process-buffer process)) ! (kill-buffer (process-buffer process))) ! (save-excursion ! (set-buffer (process-buffer process)) ! (rename-buffer (concat "saved " (buffer-name)) t) ! (vm-keep-some-buffers (current-buffer) 'vm-kept-pop-buffers ! vm-pop-keep-failed-trace-buffers))) ! (if (fboundp 'add-async-timeout) ! (add-async-timeout 2 'delete-process process) ! (run-at-time 2 nil 'delete-process process))) (defun vm-pop-stat-timer (o) (aref o 0)) ! (defun vm-pop-stat-did-report (o) (aref o 1)) ! (defun vm-pop-stat-x-box (o) (aref o 2)) ! (defun vm-pop-stat-x-currmsg (o) (aref o 3)) ! (defun vm-pop-stat-x-maxmsg (o) (aref o 4)) ! (defun vm-pop-stat-x-got (o) (aref o 5)) ! (defun vm-pop-stat-x-need (o) (aref o 6)) ! (defun vm-pop-stat-y-box (o) (aref o 7)) ! (defun vm-pop-stat-y-currmsg (o) (aref o 8)) ! (defun vm-pop-stat-y-maxmsg (o) (aref o 9)) ! (defun vm-pop-stat-y-got (o) (aref o 10)) ! (defun vm-pop-stat-y-need (o) (aref o 11)) (defun vm-set-pop-stat-timer (o val) (aset o 0 val)) ! (defun vm-set-pop-stat-did-report (o val) (aset o 1 val)) ! (defun vm-set-pop-stat-x-box (o val) (aset o 2 val)) ! (defun vm-set-pop-stat-x-currmsg (o val) (aset o 3 val)) ! (defun vm-set-pop-stat-x-maxmsg (o val) (aset o 4 val)) ! (defun vm-set-pop-stat-x-got (o val) (aset o 5 val)) ! (defun vm-set-pop-stat-x-need (o val) (aset o 6 val)) ! (defun vm-set-pop-stat-y-box (o val) (aset o 7 val)) ! (defun vm-set-pop-stat-y-currmsg (o val) (aset o 8 val)) ! (defun vm-set-pop-stat-y-maxmsg (o val) (aset o 9 val)) ! (defun vm-set-pop-stat-y-got (o val) (aset o 10 val)) ! (defun vm-set-pop-stat-y-need (o val) (aset o 11 val)) (defun vm-pop-start-status-timer () ! (let ((blob (make-vector 12 nil)) timer) *************** *** 575,576 **** --- 595,598 ---- (defun vm-pop-stop-status-timer (status-blob) + (if (vm-pop-stat-did-report status-blob) + (message "")) (if (fboundp 'disable-timeout) *************** *** 580,581 **** --- 602,604 ---- (defun vm-pop-report-retrieval-status (o) + (vm-set-pop-stat-did-report o t) (cond ((null (vm-pop-stat-x-got o)) t) *************** *** 588,603 **** (vm-pop-stat-x-box o) ! (format "%d%s of %d%s" ! (vm-pop-stat-x-got o) ! (if (> (vm-pop-stat-x-got o) ! (vm-pop-stat-x-need o)) ! "!" ! "") ! (vm-pop-stat-x-need o) ! (if (eq (vm-pop-stat-x-got o) ! (vm-pop-stat-y-got o)) ! (cond ((>= (vm-pop-stat-x-got o) ! (vm-pop-stat-x-need o)) ! "(post processing)") ! (t " (stalled)")) ! ""))))) (vm-set-pop-stat-y-box o (vm-pop-stat-x-box o)) --- 611,625 ---- (vm-pop-stat-x-box o) ! (if (vm-pop-stat-x-need o) ! (format "%d%s of %d%s" ! (vm-pop-stat-x-got o) ! (if (> (vm-pop-stat-x-got o) ! (vm-pop-stat-x-need o)) ! "!" ! "") ! (vm-pop-stat-x-need o) ! (if (eq (vm-pop-stat-x-got o) ! (vm-pop-stat-y-got o)) ! " (stalled)" ! "")) ! "post processing")))) (vm-set-pop-stat-y-box o (vm-pop-stat-x-box o)) *************** *** 752,754 **** ! (defun vm-pop-retrieve-to-crashbox (process crash statblob) (let ((start vm-pop-read-point) end) --- 774,776 ---- ! (defun vm-pop-retrieve-to-target (process target statblob) (let ((start vm-pop-read-point) end) *************** *** 771,772 **** --- 793,795 ---- (goto-char opoint))) + (vm-set-pop-stat-x-need statblob nil) (setq vm-pop-read-point (point-marker)) *************** *** 786,791 **** ;; only babyl files have the folder header, and we ! ;; should only insert it if the crash box is empty. (if (and (eq vm-folder-type 'babyl) ! (let ((attrs (file-attributes crash))) ! (or (null attrs) (equal 0 (nth 7 attrs))))) (let ((opoint (point))) --- 809,819 ---- ;; only babyl files have the folder header, and we ! ;; should only insert it if the target folder is empty. (if (and (eq vm-folder-type 'babyl) ! (cond ((stringp target) ! (let ((attrs (file-attributes target))) ! (or (null attrs) (equal 0 (nth 7 attrs))))) ! ((bufferp target) ! (save-excursion ! (set-buffer target) ! (zerop (buffer-size)))))) (let ((opoint (point))) *************** *** 803,812 **** (insert-before-markers (vm-trailing-message-separator)))) ! ;; Set file type to binary for DOS/Windows. I don't know if ! ;; this is correct to do or not; it depends on whether the ! ;; the CRLF or the LF newline convention is used on the inbox ! ;; associated with this crashbox. This setting assumes the LF ! ;; newline convention is used. ! (let ((buffer-file-type t) ! (selective-display nil)) ! (write-region start end crash t 0)) (delete-region start end) --- 831,846 ---- (insert-before-markers (vm-trailing-message-separator)))) ! (if (stringp target) ! ;; Set file type to binary for DOS/Windows. I don't know if ! ;; this is correct to do or not; it depends on whether the ! ;; the CRLF or the LF newline convention is used on the inbox ! ;; associated with this crashbox. This setting assumes the LF ! ;; newline convention is used. ! (let ((buffer-file-type t) ! (selective-display nil)) ! (write-region start end target t 0)) ! (let ((b (current-buffer))) ! (save-excursion ! (set-buffer target) ! (let ((buffer-read-only nil)) ! (insert-buffer-substring b start end))))) (delete-region start end) *************** *** 837 **** --- 871,1077 ---- (nth 3 source-list) ":*"))) + + (defun vm-establish-new-folder-pop-session (&optional interactive) + (let ((process (vm-folder-pop-process)) + (vm-pop-ok-to-ask interactive)) + (if (processp process) + (vm-pop-end-session process)) + (setq process (vm-pop-make-session (vm-folder-pop-maildrop-spec))) + (vm-set-folder-pop-process process) + process )) + + (defun vm-pop-get-uidl-data () + (let ((there (make-vector 67 0)) + (process (vm-folder-pop-process))) + (save-excursion + (set-buffer (process-buffer process)) + (vm-pop-send-command process "UIDL") + (let ((start vm-pop-read-point) + n uidl) + (catch 'done + (goto-char start) + (while (not (re-search-forward "^\\.\r\n\\|^-ERR .*$" nil 0)) + (beginning-of-line) + ;; save-excursion doesn't work right + (let ((opoint (point))) + (accept-process-output process) + (goto-char opoint))) + (setq vm-pop-read-point (point-marker)) + (goto-char start) + ;; no uidl support, bail. + (if (not (looking-at "\\+OK")) + (throw 'done nil)) + (forward-line 1) + (while (not (eq (char-after (point)) ?.)) + ;; not loking at a number, bail. + (if (not (looking-at "[0-9]")) + (throw 'done nil)) + (setq n (int-to-string (read (current-buffer)))) + (skip-chars-forward " ") + (setq start (point)) + (skip-chars-forward "\041-\176") + ;; no tag after the message number, bail. + (if (= start (point)) + (throw 'done nil)) + (setq uidl (buffer-substring start (point))) + (set (intern uidl there) n) + (forward-line 1)) + there ))))) + + (defun vm-pop-get-synchronization-data () + (let ((here (make-vector 67 0)) + (there (vm-pop-get-uidl-data)) + (process (vm-folder-pop-process)) + retrieve-list expunge-list + mp) + (setq mp vm-message-list) + (while mp + (if (null (vm-pop-uidl-of (car mp))) + nil + (set (intern (vm-pop-uidl-of (car mp)) here) (car mp)) + (if (not (boundp (intern (vm-pop-uidl-of (car mp)) there))) + (setq expunge-list (cons (car mp) expunge-list)))) + (setq mp (cdr mp))) + (mapatoms (function + (lambda (sym) + (if (and (not (boundp (intern (symbol-name sym) here))) + (not (assoc (symbol-name sym) + vm-pop-retrieved-messages))) + (setq retrieve-list (cons + (cons (symbol-name sym) + (symbol-value sym)) + retrieve-list))))) + there) + (list retrieve-list expunge-list))) + + (defun vm-pop-synchronize-folder (&optional interactive + do-remote-expunges + do-local-expunges + do-retrieves) + (if (and do-retrieves vm-block-new-mail) + (error "Can't get new mail until you save this folder.")) + (if (or vm-global-block-new-mail + (null (vm-establish-new-folder-pop-session interactive))) + nil + (if do-retrieves + (vm-assimilate-new-messages)) + (let* ((sync-data (vm-pop-get-synchronization-data)) + (retrieve-list (car sync-data)) + (local-expunge-list (nth 1 sync-data)) + (process (vm-folder-pop-process)) + (n 1) + (statblob nil) + (popdrop (vm-folder-pop-maildrop-spec)) + (safe-popdrop (vm-safe-popdrop-string popdrop)) + r-list mp got-some pr-list message-size + (folder-buffer (current-buffer))) + (if (and do-retrieves retrieve-list) + (save-excursion + (vm-save-restriction + (widen) + (goto-char (point-max)) + (condition-case error-data + (save-excursion + (set-buffer (process-buffer process)) + (setq statblob (vm-pop-start-status-timer)) + (vm-set-pop-stat-x-box statblob safe-popdrop) + (vm-set-pop-stat-x-maxmsg statblob + (length retrieve-list)) + (setq r-list retrieve-list) + (while r-list + (vm-set-pop-stat-x-currmsg statblob n) + (vm-pop-send-command process (format "LIST %s" + (cdr (car r-list)))) + (setq message-size (vm-pop-read-list-response process)) + (vm-set-pop-stat-x-need statblob message-size) + (vm-pop-send-command process + (format "RETR %s" + (cdr (car r-list)))) + (and (null (vm-pop-read-response process)) + (error "server didn't say +OK to RETR %s command" + (cdr (car r-list)))) + (vm-pop-retrieve-to-target process folder-buffer + statblob) + (setq r-list (cdr r-list)))) + (error + (message "Retrieval from %s signaled: %s" safe-popdrop + error-data)) + (quit + (message "Quit received during retrieval from %s" + safe-popdrop))) + (and statblob (vm-pop-stop-status-timer statblob)) + ;; to make the "Mail" indicator go away + (setq vm-spooled-mail-waiting nil) + (intern (buffer-name) vm-buffers-needing-display-update) + (vm-increment vm-modification-counter) + (vm-update-summary-and-mode-line) + (setq mp (vm-assimilate-new-messages t)) + (setq got-some mp) + (setq r-list retrieve-list) + (while mp + (vm-set-pop-uidl-of (car mp) (car (car r-list))) + (vm-set-modflag-of (car mp) t) + (setq mp (cdr mp) + r-list (cdr r-list)))))) + (if do-local-expunges + (vm-expunge-folder t t local-expunge-list)) + (if (and do-remote-expunges + vm-pop-messages-to-expunge) + (let ((process (vm-folder-pop-process))) + ;; POP servers usually allow only one remote accessor + ;; at a time vm-expunge-pop-messages will set up its + ;; own connection so we get out of its way by closing + ;; our connection. + (if (and (processp process) + (memq (process-status process) '(open run))) + (vm-pop-end-session process)) + (setq vm-pop-retrieved-messages + (mapcar (function (lambda (x) (list x popdrop 'uidl))) + vm-pop-messages-to-expunge)) + (vm-expunge-pop-messages) + (setq vm-pop-messages-to-expunge + (mapcar (function (lambda (x) (car x))) + vm-pop-retrieved-messages)))) + got-some))) + + (defun vm-pop-folder-check-for-mail (&optional interactive) + (if (or vm-global-block-new-mail + (null (vm-establish-new-folder-pop-session interactive))) + nil + (let ((result (car (vm-pop-get-synchronization-data)))) + (vm-pop-end-session (vm-folder-pop-process)) + result ))) + + (defun vm-pop-find-spec-for-name (name) + (let ((list vm-pop-folder-alist) + (done nil)) + (while (and (not done) list) + (if (equal name (nth 1 (car list))) + (setq done t) + (setq list (cdr list)))) + (and list (car (car list))))) + + (defun vm-pop-find-name-for-spec (spec) + (let ((list vm-pop-folder-alist) + (done nil)) + (while (and (not done) list) + (if (equal spec (car (car list))) + (setq done t) + (setq list (cdr list)))) + (and list (nth 1 (car list))))) + + (defun vm-pop-find-name-for-buffer (buffer) + (let ((list vm-pop-folder-alist) + (done nil)) + (while (and (not done) list) + (if (eq buffer (vm-get-file-buffer (vm-pop-make-filename-for-spec + (car (car list))))) + (setq done t) + (setq list (cdr list)))) + (and list (nth 1 (car list))))) + + (defun vm-pop-make-filename-for-spec (spec) + (expand-file-name + (concat "pop-cache-" (vm-md5-string spec)) + (or vm-pop-folder-cache-directory + vm-folder-directory + (getenv "HOME")))) *** dist/vm-startup.el.dist Sun Nov 25 22:09:21 2001 --- vm-startup.el Sun Dec 2 23:10:59 2001 *************** *** 22,24 **** ;;;###autoload ! (defun vm (&optional folder read-only) "Read mail under Emacs. --- 22,24 ---- ;;;###autoload ! (defun vm (&optional folder read-only access-method) "Read mail under Emacs. *************** *** 52,54 **** --- 52,61 ---- folder-buffer first-time totals-blurb + folder-name remote-spec preserve-auto-save-file) + (cond ((eq access-method 'pop) + (setq remote-spec (vm-pop-find-spec-for-name folder)) + (if (null remote-spec) + (error "No such POP folder: %s" folder)) + (setq folder-name folder + folder (vm-pop-make-filename-for-spec remote-spec)))) (setq folder-buffer *************** *** 77,79 **** ;; update folder history ! (let ((item (or folder vm-primary-inbox))) (if (not (equal item (car vm-folder-history))) --- 84,87 ---- ;; update folder history ! (let ((item (or remote-spec folder ! vm-primary-inbox))) (if (not (equal item (car vm-folder-history))) *************** *** 83,84 **** --- 91,95 ---- (set-buffer folder-buffer) + (cond ((eq access-method 'pop) + (if (not (equal folder-name (buffer-name))) + (rename-buffer folder-name t)))) (if (and vm-fsfemacs-mule-p enable-multibyte-characters) *************** *** 173,175 **** (vm-fsfemacs-nonmule-display-8bit-chars) ! (vm-mode-internal) ;; If the buffer is modified we don't know if the --- 184,188 ---- (vm-fsfemacs-nonmule-display-8bit-chars) ! (vm-mode-internal access-method) ! (cond ((eq access-method 'pop) ! (vm-set-folder-pop-maildrop-spec remote-spec))) ;; If the buffer is modified we don't know if the *************** *** 272,275 **** - (if full-startup - (message totals-blurb)) ;; Warn user about auto save file, if appropriate. --- 285,286 ---- *************** *** 284,285 **** --- 295,300 ---- (throw 'done t)) + + (if full-startup + (message totals-blurb)) + (if (and vm-auto-get-new-mail *************** *** 290,292 **** (or buffer-file-name (buffer-name))) ! (if (and (vm-get-spooled-mail t) (vm-assimilate-new-messages t)) (progn --- 305,307 ---- (or buffer-file-name (buffer-name))) ! (if (vm-get-spooled-mail t) (progn *************** *** 339,341 **** ! This is VM 6.99. --- 354,356 ---- ! This is VM 7.00. *************** *** 627,628 **** --- 642,644 ---- vm-pop-expunge-after-retrieving + vm-pop-folder-alist vm-pop-max-message-size *************** *** 742,746 **** (setq vm-last-visit-folder folder) ! (let ((default-directory (or vm-folder-directory default-directory))) ! (setq folder (expand-file-name folder))) ! (vm folder read-only)) --- 758,769 ---- (setq vm-last-visit-folder folder) ! (let ((access-method nil) foo) ! (cond ((and (stringp vm-recognize-pop-maildrops) ! (string-match vm-recognize-pop-maildrops folder) ! (setq foo (vm-pop-find-name-for-spec folder))) ! (setq folder foo ! access-method 'pop)) ! (t ! (let ((default-directory (or vm-folder-directory default-directory))) ! (setq folder (expand-file-name folder))))) ! (vm folder read-only access-method))) *************** *** 807,808 **** --- 830,931 ---- + ;;;###autoload + (defun vm-visit-pop-folder (folder &optional read-only) + "Visit a POP mailbox. + VM will parse and present its messages to you in the usual way. + + First arg FOLDER specifies the name of the POP mailbox to visit. + You can only visit mailboxes that are specified in `vm-pop-folder-alist'. + When this command is called interactively the mailbox name is read from the + minibuffer. + + Prefix arg or optional second arg READ-ONLY non-nil indicates + that the folder should be considered read only. No attribute + changes, messages additions or deletions will be allowed in the + visited folder." + (interactive + (save-excursion + (vm-session-initialization) + (vm-check-for-killed-folder) + (vm-select-folder-buffer-if-possible) + (let ((completion-list (mapcar (function (lambda (x) (nth 1 x))) + vm-pop-folder-alist)) + (default vm-last-visit-pop-folder) + (this-command this-command) + (last-command last-command)) + (list (vm-read-string + (format "Visit%s POP folder:%s " + (if current-prefix-arg " read only" "") + (if default + (format " (default %s)" default) + "")) + completion-list) + current-prefix-arg)))) + (vm-session-initialization) + (vm-check-for-killed-folder) + (vm-select-folder-buffer-if-possible) + (vm-check-for-killed-summary) + (if (null (vm-pop-find-spec-for-name folder)) + (error "No such POP folder: %s" folder)) + (setq vm-last-visit-pop-folder folder) + (vm folder read-only 'pop)) + + ;;;###autoload + (defun vm-visit-pop-folder-other-frame (folder &optional read-only) + "Like vm-visit-pop-folder, but run in a newly created frame." + (interactive + (save-excursion + (vm-session-initialization) + (vm-check-for-killed-folder) + (vm-select-folder-buffer-if-possible) + (let ((completion-list (mapcar (function (lambda (x) (nth 1 x))) + vm-pop-folder-alist)) + (default vm-last-visit-pop-folder) + (this-command this-command) + (last-command last-command)) + (list (vm-read-string + (format "Visit%s POP folder:%s " + (if current-prefix-arg " read only" "") + (if default + (format " (default %s)" default) + "")) + completion-list) + current-prefix-arg)))) + (vm-session-initialization) + (if (vm-multiple-frames-possible-p) + (vm-goto-new-frame 'folder)) + (let ((vm-frame-per-folder nil) + (vm-search-other-frames nil)) + (vm-visit-pop-folder folder read-only)) + (if (vm-multiple-frames-possible-p) + (vm-set-hooks-for-frame-deletion))) + + ;;;###autoload + (defun vm-visit-pop-folder-other-window (folder &optional read-only) + "Like vm-visit-pop-folder, but run in a different window." + (interactive + (save-excursion + (vm-session-initialization) + (vm-check-for-killed-folder) + (vm-select-folder-buffer-if-possible) + (let ((completion-list (mapcar (function (lambda (x) (nth 1 x))) + vm-pop-folder-alist)) + (default vm-last-visit-pop-folder) + (this-command this-command) + (last-command last-command)) + (list (vm-read-string + (format "Visit%s POP folder:%s " + (if current-prefix-arg " read only" "") + (if default + (format " (default %s)" default) + "")) + completion-list) + current-prefix-arg)))) + (vm-session-initialization) + (if (one-window-p t) + (split-window)) + (other-window 1) + (let ((vm-frame-per-folder nil) + (vm-search-other-frames nil)) + (vm-visit-pop-folder folder read-only))) + (put 'vm-virtual-mode 'mode-class 'special) *************** *** 1282,1283 **** --- 1405,1408 ---- 'vm-pop-expunge-after-retrieving + ;; POP passwords might be listed here + ;; 'vm-pop-folder-alist 'vm-pop-max-message-size *************** *** 1436,1438 **** ;; don't need this face under Emacs 21. ! (fboundp 'vm-image-type-available-p) (facep 'vm-image-placeholder)) --- 1561,1563 ---- ;; don't need this face under Emacs 21. ! (fboundp 'image-type-available-p) (facep 'vm-image-placeholder)) *** dist/vm-summary.el.dist Sun Nov 25 22:09:21 2001 --- vm-summary.el Mon Nov 26 21:44:49 2001 *************** *** 757,762 **** (zerop (length year))) ! (string-match " \\([0-9]+\\) " date start)) ! (setq string (substring date (match-beginning 1) (match-end 1)) start (match-end 0)) ! (cond ((zerop (length monthday)) (setq monthday string)) --- 757,763 ---- (zerop (length year))) ! (string-match "\\(^\\| \\)\\([0-9]+\\) " date start)) ! (setq string (substring date (match-beginning 2) (match-end 2)) start (match-end 0)) ! (cond ((and (zerop (length monthday)) ! (<= (length string) 2)) (setq monthday string)) *** dist/vm-vars.el.dist Sun Nov 25 22:09:21 2001 --- vm-vars.el Sun Dec 2 09:24:20 2001 *************** *** 28,29 **** --- 28,32 ---- + (defvar vm-folder-directory nil + "*Directory where folders of mail are kept.") + (defvar vm-primary-inbox "~/INBOX" *************** *** 352,353 **** --- 355,376 ---- + (defvar vm-pop-folder-alist nil + "*Alist of POP maildrop specifications and names that refer to them. + The alist format is: + + ((POPDROP NAME) ...) + + POPDROP is a POP maildrop specification in the same format used + by vm-spool-files (which see). + + NAME is a string that should give a less cumbersome name that you + will use to refer to this maildrop when using `vm-visit-pop-folder'.") + + (defvar vm-pop-folder-cache-directory nil + "*Directory where VM stores cached copies of POP folders. + When VM visits a POP folder (really just a POP server where you + have a mailbox) it stores the retrieved message on your computer + so that they need not be retrieved each time you visit the folder. + The cached copies are stored in the directory specified by this + variable.") + (defvar vm-imap-max-message-size nil *************** *** 1487,1491 **** - (defvar vm-folder-directory nil - "*Directory where folders of mail are kept.") - (defvar vm-confirm-new-folders nil --- 1510,1511 ---- *************** *** 3467,3468 **** --- 3487,3492 ---- (make-variable-buffer-local 'vm-folder-type) + (defvar vm-folder-access-method nil) + (make-variable-buffer-local 'vm-folder-access-method) + (defvar vm-folder-access-data nil) + (make-variable-buffer-local 'vm-folder-access-data) (defvar vm-message-list nil) *************** *** 3512,3513 **** --- 3536,3538 ---- (defvar vm-last-visit-folder nil) + (defvar vm-last-visit-pop-folder nil) (defvar vm-last-pipe-command nil) *************** *** 3699,3701 **** --- 3724,3728 ---- ("vm-scroll-backward") + ("vm-scroll-backward-one-line") ("vm-scroll-forward") + ("vm-scroll-forward-one-line") ("vm-send-digest") *************** *** 3732,3733 **** --- 3759,3763 ---- ("vm-visit-folder-other-window") + ("vm-visit-pop-folder") + ("vm-visit-pop-folder-other-frame") + ("vm-visit-pop-folder-other-window") ("vm-visit-virtual-folder") *************** *** 3867,3870 **** (defconst vm-attributes-vector-length 9) ! (defconst vm-cache-vector-length 21) ! (defconst vm-softdata-vector-length 19) (defconst vm-location-data-vector-length 6) --- 3897,3900 ---- (defconst vm-attributes-vector-length 9) ! (defconst vm-cache-vector-length 24) ! (defconst vm-softdata-vector-length 20) (defconst vm-location-data-vector-length 6) *************** *** 3952,3953 **** --- 3982,3985 ---- (make-variable-buffer-local 'vm-pop-retrieved-messages) + (defvar vm-pop-messages-to-expunge nil) + (make-variable-buffer-local 'vm-pop-messages-to-expunge) (defvar vm-imap-read-point nil) *** dist/vm-version.el.dist Sun Nov 25 22:09:22 2001 --- vm-version.el Sun Dec 2 23:10:59 2001 *************** *** 4,6 **** ! (defconst vm-version "6.99" "Version number of VM.") --- 4,6 ---- ! (defconst vm-version "7.00" "Version number of VM.") *** dist/vm-virtual.el.dist Sat Jun 23 18:58:00 2001 --- vm-virtual.el Thu Nov 29 11:50:08 2001 *************** *** 188,189 **** --- 188,191 ---- (vm-set-message-type-of message vm-folder-type) + (vm-set-message-access-method-of + message vm-folder-access-method) (vm-set-message-id-number-of message