*** dist/vm-folder.el.dist Thu Nov 2 09:27:07 2000 --- vm-folder.el Fri Nov 10 09:40:59 2000 *************** *** 710,712 **** (defun vm-trailing-message-separator (&optional folder-type) ! "Returns a leading message separator for the current folder. Defaults to returning a separator for the current folder type. --- 710,712 ---- (defun vm-trailing-message-separator (&optional folder-type) ! "Returns a trailing message separator for the current folder. Defaults to returning a separator for the current folder type. *************** *** 2994,2995 **** --- 2994,2998 ---- (progn + (vm-stuff-last-modified) + (vm-stuff-pop-retrieved) + (vm-stuff-imap-retrieved) (vm-stuff-summary) *** dist/vm-imap.el.dist Thu Nov 2 09:27:07 2000 --- vm-imap.el Fri Nov 10 09:53:23 2000 *************** *** 50,52 **** mailbox mailbox-count message-size response ! n retrieved retrieved-bytes process-buffer) (setq auto-expunge (cond ((setq x (assoc source --- 50,52 ---- mailbox mailbox-count message-size response ! n (retrieved 0) retrieved-bytes process-buffer) (setq auto-expunge (cond ((setq x (assoc source *************** *** 87,89 **** ;; messages as we go. ! (setq n 1 retrieved 0 retrieved-bytes 0) (setq statblob (vm-imap-start-status-timer)) --- 87,89 ---- ;; messages as we go. ! (setq n 1 retrieved-bytes 0) (setq statblob (vm-imap-start-status-timer)) *************** *** 161,162 **** --- 161,164 ---- (setq vm-imap-retrieved-messages imap-retrieved-messages) + (if (and (eq vm-flush-interval t) (not (equal retrieved 0))) + (vm-stuff-imap-retrieved)) (and statblob (vm-imap-stop-status-timer statblob)) *** dist/vm-menu.el.dist Tue Nov 7 21:28:27 2000 --- vm-menu.el Wed Nov 8 11:24:06 2000 *************** *** 383,391 **** "---" ! ["Save to File" (vm-mime-run-display-function-at-point ! 'vm-mime-send-body-to-file) t] ! ["Save to folder" (vm-mime-run-display-function-at-point ! 'vm-mime-send-body-to-folder) ! (let ((layout (vm-mime-run-display-function-at-point 'identity))) (if (null layout) ! nil (or (vm-mime-types-match "message/rfc822" --- 383,392 ---- "---" ! ["Save to File" vm-mime-reader-map-save-file t] ! ["Save to Folder" vm-mime-reader-map-save-message ! (let ((layout (vm-mime-run-display-function-at-point ! (function ! (lambda (e) ! (vm-extent-property e 'vm-mime-layout)))))) (if (null layout) ! (error "foo!") (or (vm-mime-types-match "message/rfc822" *** dist/vm-mime.el.dist Tue Nov 7 21:28:27 2000 --- vm-mime.el Fri Nov 10 12:32:55 2000 *************** *** 163,167 **** (save-excursion (set-buffer work-buffer) (insert-buffer-substring b b-start b-end) - (setq oldsize (buffer-size)) (setq retval (apply 'decode-coding-region (point-min) (point-max) --- 163,167 ---- (save-excursion + (setq oldsize (- b-end b-start)) (set-buffer work-buffer) (insert-buffer-substring b b-start b-end) (setq retval (apply 'decode-coding-region (point-min) (point-max) *************** *** 173,176 **** (goto-char b-start) - (insert-buffer-substring work-buffer start end) (delete-region (point) (+ (point) oldsize)) ;; Fixup the end point. I have found no other way to --- 173,176 ---- (goto-char b-start) (delete-region (point) (+ (point) oldsize)) + (insert-buffer-substring work-buffer start end) ;; Fixup the end point. I have found no other way to *************** *** 633,637 **** charset (buffer-substring (match-beginning 1) (match-end 1)) ! encoding (buffer-substring (match-beginning 2) (match-end 2)) ! start (match-beginning 3) ! end (vm-marker (match-end 3))) ;; don't change anything if we can't display the --- 633,637 ---- charset (buffer-substring (match-beginning 1) (match-end 1)) ! encoding (buffer-substring (match-beginning 4) (match-end 4)) ! start (match-beginning 5) ! end (vm-marker (match-end 5))) ;; don't change anything if we can't display the *************** *** 666,670 **** charset (buffer-substring (match-beginning 1) (match-end 1)) ! encoding (buffer-substring (match-beginning 2) (match-end 2)) ! start (match-beginning 3) ! end (vm-marker (match-end 3))) ;; don't change anything if we can't display the --- 666,670 ---- charset (buffer-substring (match-beginning 1) (match-end 1)) ! encoding (buffer-substring (match-beginning 4) (match-end 4)) ! start (match-beginning 5) ! end (vm-marker (match-end 5))) ;; don't change anything if we can't display the *************** *** 1012,1014 **** (setq param-list (cdr param-list)))) ! (and (car param-list) (car (vm-parse (car param-list) "=\\(.*\\)"))))) --- 1012,1015 ---- (setq param-list (cdr param-list)))) ! (and (car param-list) ! (substring (car param-list) match-end)))) *************** *** 1208,1210 **** ! (defun vm-mime-can-display-internal (layout) (let ((type (car (vm-mm-layout-type layout)))) --- 1209,1211 ---- ! (defun vm-mime-can-display-internal (layout &optional deep) (let ((type (car (vm-mm-layout-type layout)))) *************** *** 1227,1229 **** ((vm-mime-types-match "multipart" type) t) ! ((vm-mime-types-match "message/external-body" type) t) ((vm-mime-types-match "message" type) t) --- 1228,1233 ---- ((vm-mime-types-match "multipart" type) t) ! ((vm-mime-types-match "message/external-body" type) ! (or (not deep) ! (vm-mime-can-display-internal ! (car (vm-mm-layout-parts layout)) t))) ((vm-mime-types-match "message" type) t) *************** *** 1562,1563 **** --- 1566,1569 ---- (start (point)) + (charset (or (vm-mime-get-parameter layout "charset") + "us-ascii")) end buffer-size) *************** *** 1567,1569 **** (vm-mime-transfer-decode-region layout start end) ! (vm-mime-charset-decode-region layout start end) (w3-region start end) --- 1573,1575 ---- (vm-mime-transfer-decode-region layout start end) ! (vm-mime-charset-decode-region charset start end) (w3-region start end) *************** *** 1617,1619 **** (buffer-read-only nil) ! (enriched-verbose t)) (message "Decoding text/enriched, be patient...") --- 1623,1626 ---- (buffer-read-only nil) ! (enriched-verbose t) ! (charset (or (vm-mime-get-parameter layout "charset") "us-ascii"))) (message "Decoding text/enriched, be patient...") *************** *** 1622,1624 **** (vm-mime-transfer-decode-region layout start end) ! (vm-mime-charset-decode-region layout start end) ;; enriched-decode expects a couple of headers at the top of --- 1629,1631 ---- (vm-mime-transfer-decode-region layout start end) ! (vm-mime-charset-decode-region charset start end) ;; enriched-decode expects a couple of headers at the top of *************** *** 1797,1799 **** (setq type (car (vm-mm-layout-type (car part-list)))) ! (if (or (vm-mime-can-display-internal (car part-list)) (vm-mime-find-external-viewer type)) --- 1804,1806 ---- (setq type (car (vm-mm-layout-type (car part-list)))) ! (if (or (vm-mime-can-display-internal (car part-list) t) (vm-mime-find-external-viewer type)) *************** *** 1812,1814 **** (setq type (car (vm-mm-layout-type (car part-list)))) ! (cond ((and (vm-mime-can-display-internal (car part-list)) (vm-mime-should-display-internal (car part-list) --- 1819,1821 ---- (setq type (car (vm-mm-layout-type (car part-list)))) ! (cond ((and (vm-mime-can-display-internal (car part-list) t) (vm-mime-should-display-internal (car part-list) *************** *** 1972,1973 **** --- 1979,2016 ---- (error (signal 'vm-mime-error (cdr data)))))) + ((and (string= access-method "url") + vm-url-retrieval-methods) + (defvar w3-configuration-directory) ; for bytecompiler + (let ((url (vm-mime-get-parameter layout "url")) + ;; needed or url-retrieve will bitch + (w3-configuration-directory + (if (boundp 'w3-configuration-directory) + w3-configuration-directory + "~")) + (url-work-buffer (buffer-name work-buffer))) + (if (null url) + (vm-mime-error + "%s access type missing `url' parameter" + access-method)) + (setq url (vm-with-string-as-temp-buffer + url + (function + (lambda () + (goto-char (point-min)) + (while (re-search-forward "[ \t\n]" nil t) + (delete-char -1)))))) + (cond + ((vm-mime-fetch-url-with-programs url work-buffer) t) + ((and (fboundp 'url-retrieve) + (memq 'url-w3 vm-url-retrieval-methods)) + (condition-case data + (progn + (url-retrieve url) + ;; url-retrieve kills the buffer before + ;; starting so work-buffer must be set + ;; to the buffer object again. + (setq work-buffer (get-buffer url-work-buffer)) + (if (zerop (buffer-size)) + (error "file empty or URL retrieval failed"))) + (error (signal 'vm-mime-error (cdr data))))) + (t nil)))) ((and (or (string= access-method "ftp") *************** *** 1995,2007 **** (t (setq user "anonymous"))) ! (cond (directory ! (setq directory ! (concat "/" user "@" site ":" directory)) ! (setq name (expand-file-name name directory))) ! (t ! (setq name (concat "/" user "@" site ":" ! name)))) ! (condition-case data ! (insert-file-contents name) ! (error (signal 'vm-mime-error ! (format "%s" (cdr data))))))) ((string= access-method "mail-server") --- 2038,2059 ---- (t (setq user "anonymous"))) ! (if (and (string= access-method "ftp") ! vm-url-retrieval-methods ! (vm-mime-fetch-url-with-programs ! (if directory ! (concat "ftp:////" site "/" ! directory "/" name) ! (concat "ftp:////" site "/" name)) ! work-buffer)) ! t ! (cond (directory ! (setq directory ! (concat "/" user "@" site ":" directory)) ! (setq name (expand-file-name name directory))) ! (t ! (setq name (concat "/" user "@" site ":" ! name)))) ! (condition-case data ! (insert-file-contents name) ! (error (signal 'vm-mime-error ! (format "%s" (cdr data)))))))) ((string= access-method "mail-server") *************** *** 2042,2043 **** --- 2094,2115 ---- + (defun vm-mime-fetch-url-with-programs (url buffer) + (and + (eq t (cond ((and (memq 'wget vm-url-retrieval-methods) + (condition-case data + (vm-run-command-on-region (point) (point) + buffer + vm-wget-program + "-q" "-O" "-" url) + (error nil)))) + ((and (memq 'lynx vm-url-retrieval-methods) + (condition-case data + (vm-run-command-on-region (point) (point) + buffer + vm-lynx-program + "-source" url) + (error nil)))))) + (save-excursion + (set-buffer buffer) + (not (zerop (buffer-size)))))) + (defun vm-mime-display-internal-message/partial (layout) *************** *** 2544,2545 **** --- 2616,2622 ---- (vm-mime-transfer-decode-region layout (point-min) (point-max)) + (goto-char (point-min)) + (insert (vm-leading-message-separator 'mmdf)) + (goto-char (point-max)) + (insert (vm-trailing-message-separator 'mmdf)) + (set-buffer-modified-p nil) (vm-mode t) *** dist/vm-pop.el.dist Thu Nov 2 09:27:07 2000 --- vm-pop.el Fri Nov 10 09:53:23 2000 *************** *** 53,55 **** mailbox-count mailbox-size message-size response ! n retrieved retrieved-bytes process-buffer uidl) (setq auto-expunge (cond ((setq x (assoc source vm-pop-auto-expunge-alist)) --- 53,55 ---- mailbox-count mailbox-size message-size response ! n (retrieved 0) retrieved-bytes process-buffer uidl) (setq auto-expunge (cond ((setq x (assoc source vm-pop-auto-expunge-alist)) *************** *** 83,85 **** ;; messages as we go. ! (setq n 1 retrieved 0 retrieved-bytes 0) (setq statblob (vm-pop-start-status-timer)) --- 83,85 ---- ;; messages as we go. ! (setq n 1 retrieved-bytes 0) (setq statblob (vm-pop-start-status-timer)) *************** *** 180,181 **** --- 180,183 ---- (setq vm-pop-retrieved-messages pop-retrieved-messages) + (if (and (eq vm-flush-interval t) (not (equal retrieved 0))) + (vm-stuff-pop-retrieved)) (and statblob (vm-pop-stop-status-timer statblob)) *** dist/vm-startup.el.dist Tue Nov 7 21:28:28 2000 --- vm-startup.el Fri Nov 10 20:49:42 2000 *************** *** 338,340 **** ! This is VM 6.81. --- 338,340 ---- ! This is VM 6.82. *************** *** 820,821 **** --- 820,822 ---- (auto-fill-mode 0) + (vm-fsfemacs-nonmule-display-8bit-chars) (setq mode-name "VM Virtual" *** dist/vm-summary.el.dist Sun Nov 5 22:40:19 2000 --- vm-summary.el Fri Nov 10 15:26:17 2000 *************** *** 553,554 **** --- 553,556 ---- + ;; Do not use Emacs 20's string-width here. + ;; It does not consider buffer-display-table. (defun vm-string-width (string) *************** *** 556,566 **** (length string) ! (if (fboundp 'string-width) ! (string-width string) ! (let ((i 0) ! (lim (length string)) ! (total 0)) ! (while (< i lim) ! (setq total (+ total (char-width (aref string i))) ! i (1+ i))) ! total )))) --- 558,566 ---- (length string) ! (let ((i 0) ! (lim (length string)) ! (total 0)) ! (while (< i lim) ! (setq total (+ total (char-width (aref string i))) ! i (1+ i))) ! total ))) *************** *** 594,604 **** (cond ((fboundp 'char-width) ! (let ((i 0) ! (lim (length string)) ! (total 0)) ! (while (and (< i lim) (<= total width)) ! (setq total (+ total (char-width (aref string i))) ! i (1+ i))) ! (if (<= total width) ! string ! (substring string 0 (1- i))))) (t (vm-truncate-roman-string string width)))) --- 594,616 ---- (cond ((fboundp 'char-width) ! (cond ((> width 0) ! (let ((i 0) ! (lim (length string)) ! (total 0)) ! (while (and (< i lim) (< total width)) ! (setq total (+ total (char-width (aref string i))) ! i (1+ i))) ! (if (< total width) ! string ! (substring string 0 i)))) ! (t ! (let ((i (1- (length string))) ! (lim -1) ! (total 0)) ! (setq width (- width)) ! (while (and (> i lim) (< total width)) ! (setq total (+ total (char-width (aref string i))) ! i (1- i))) ! (if (< total width) ! string ! (substring string (1+ i))))))) (t (vm-truncate-roman-string string width)))) *** dist/vm-vars.el.dist Sun Nov 5 02:08:13 2000 --- vm-vars.el Fri Nov 10 12:40:26 2000 *************** *** 1114,1117 **** "*Non-nil value should be a string that names a MIME base64 decoder. ! The program should expect to read base64 data on its standard ! input and write the converted data to its standard output.") --- 1114,1119 ---- "*Non-nil value should be a string that names a MIME base64 decoder. ! If the program is in your executable search path, you need not ! specify a full pathname. The program should expect to read ! base64 data on its standard input and write the converted data ! to its standard output.") *************** *** 1123,1126 **** "*Non-nil value should be a string that names a MIME base64 encoder. ! The program should expect arbitrary data on its standard ! input and write base64 data to its standard output.") --- 1125,1130 ---- "*Non-nil value should be a string that names a MIME base64 encoder. ! If the program is in your executable search path, you need not ! specify a full pathname. The program should expect arbitrary ! data on its standard input and write base64 data to its standard ! output.") *************** *** 1132,1136 **** "*Non-nil value should be a string that names a MIME quoted-printable ! decoder. The program should expect to read quoted-printable ! data on its standard input and write the converted data to its ! standard output.") --- 1136,1141 ---- "*Non-nil value should be a string that names a MIME quoted-printable ! decoder. If the program is in your executable search path, you ! need not specify a full pathname. The program should expect to ! read quoted-printable data on its standard input and write the ! converted data to its standard output.") *************** *** 1142,1145 **** "*Non-nil value should be a string that names a MIME quoted-printable ! encoder. The program should expect arbitrary data on its standard ! input and write quoted-printable data to its standard output.") --- 1147,1152 ---- "*Non-nil value should be a string that names a MIME quoted-printable ! encoder. If the program is in your executable search path, you ! need not specify a full pathname. The program should expect ! arbitrary data on its standard input and write quoted-printable ! data to its standard output.") *************** *** 1151,1155 **** "*Non-nil value should be a string that names UUENCODE decoder. ! The program should expect to read uuencoded data on its standard ! input and write the converted data to the file specified in the ! ``begin'' line at the start of the data.") --- 1158,1164 ---- "*Non-nil value should be a string that names UUENCODE decoder. ! If the program is in your executable search path, you need not ! specify a full pathname. The program should expect to read ! uuencoded data on its standard input and write the converted ! data to the file specified in the ``begin'' line at the start of ! the data.") *************** *** 2386,2387 **** --- 2395,2415 ---- + (defvar vm-url-retrieval-methods '(lynx wget url-w3) + "*Non-mil value specifies how VM is permitted to retrieve URLs. + VM needs to do this when supporting the message/external-body + MIME type, which provides a reference to an object instead of the + object itself. The specification should be a list of symbols + with the following meanings + + lynx - means VM should try to use the lynx program. + wget - means VM should to use the wget program. + url-w3 - means use Emacs-W3's URL retrieval package. + + The list can contain all these values and VM will try them all, + but not in any particular order, except that the url-w3 method + will likely be tried last since it is likely to be the slowest + retrieval method. + + If `vm-url-retrieval-methods' value is nil, VM will not try to + use any external programs.") + (defvar vm-url-browser *************** *** 2421,2423 **** for Mosaic. The advantage of using them is that they will display ! an URL using on existing Mosaic or Netscape process, if possible. --- 2449,2451 ---- for Mosaic. The advantage of using them is that they will display ! an URL using an existing Mosaic or Netscape process, if possible. *************** *** 2433,2435 **** VM will search for URLs. For message larger than this value, VM ! will search from the beginning of the mssage to a point `vm-url-search-limit' / 2 characters into the message. Then VM will --- 2461,2463 ---- VM will search for URLs. For message larger than this value, VM ! will search from the beginning of the message to a point `vm-url-search-limit' / 2 characters into the message. Then VM will *************** *** 2859,2860 **** --- 2887,2896 ---- + (defvar vm-wget-program "wget" + "*Name of program to use to run wget. + This is uses to retrieve URLs.") + + (defvar vm-lynx-program "lynx" + "*Name of program to use to run lynx. + This is uses to retrieve URLs.") + (defvar vm-temp-file-directory *************** *** 2927,2928 **** --- 2963,2969 ---- (define-key map "###" 'vm-expunge-folder) + (cond ((fboundp 'set-keymap-prompt) + (set-keymap-prompt (lookup-key map "#") + "(Type # twice more to expunge)") + (set-keymap-prompt (lookup-key map "##") + "(Type # once more to expunge)"))) (define-key map "q" 'vm-quit) *************** *** 3817,3819 **** (defconst vm-mime-encoded-word-regexp ! "=\\?\\([^?]+\\)\\?\\([BQ]\\)\\?\\([^?]+\\)\\?=") ;; for MS-DOS and Windows NT --- 3858,3860 ---- (defconst vm-mime-encoded-word-regexp ! "=\\?\\([^?*]+\\)\\(\\*\\([^?*]+\\)\\)?\\?\\([BbQq]\\)\\?\\([^?]+\\)\\?=") ;; for MS-DOS and Windows NT *** dist/vm-version.el.dist Tue Nov 7 21:28:28 2000 --- vm-version.el Fri Nov 10 20:49:42 2000 *************** *** 4,6 **** ! (defconst vm-version "6.81" "Version number of VM.") --- 4,6 ---- ! (defconst vm-version "6.82" "Version number of VM.")