From: yamaoka Date: Mon, 15 May 2000 22:09:35 +0000 (+0000) Subject: Sync. X-Git-Tag: t-gnus-6_14-quimby-before-AC-changed-~70 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae299fea39d28fe7faa1e635b8f09d27bba65547;p=elisp%2Fgnus.git- Sync. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ba0d052..c356592 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-05-15 09:46:47 Shenghuo ZHU + + * mail-source.el (mail-source-fetch-maildir): Insert "From ". + (mail-source-keyword-map): Add "subdirs" for maildir. + 2000-05-14 16:19:28 Shenghuo ZHU * nnmail.el (nnmail-scan-directory-mail-source-once): New variable. diff --git a/lisp/mail-source.el b/lisp/mail-source.el index 022caa6..ff254c5 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -115,7 +115,8 @@ Common keywords should be listed here.") (:connection) (:authentication password)) (maildir - (:path "~/Maildir/new/") + (:path (or (getenv "MAILDIR") "~/Maildir/")) + (:subdirs ("new" "cur")) (:function)) (imap (:server (getenv "MAILHOST")) @@ -608,13 +609,32 @@ This only works when `display-time' is enabled." "Fetcher for maildir sources." (mail-source-bind (maildir source) (let ((found 0) - (mail-source-string (format "maildir:%s" path))) - (dolist (file (directory-files path t)) - (when (and (not (file-directory-p file)) - (not (if function - (funcall function file mail-source-crash-box) - (rename-file file mail-source-crash-box)))) - (incf found (mail-source-callback callback file)))) + mail-source-string) + (unless (string-match "/$" path) + (setq path (concat path "/"))) + (dolist (subdir subdirs) + (when (file-directory-p (concat path subdir)) + (setq mail-source-string (format "maildir:%s%s" path subdir)) + (dolist (file (directory-files (concat path subdir) t)) + (when (and (not (file-directory-p file)) + (not (if function + (funcall function file mail-source-crash-box) + (let ((coding-system-for-write + mm-text-coding-system) + (coding-system-for-read + mm-text-coding-system)) + (with-temp-file mail-source-crash-box + (insert-file-contents file) + (goto-char (point-min)) + (unless (looking-at "\n*From ") + (insert "From maildir " + (current-time-string) "\n")) + (while (re-search-forward "^From " nil t) + (replace-match ">From ")) + (goto-char (point-max)) + (insert "\n\n")) + (delete-file file))))) + (incf found (mail-source-callback callback file)))))) found))) (eval-and-compile diff --git a/texi/ChangeLog b/texi/ChangeLog index 7229fe8..dd1ea11 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,7 @@ +2000-05-15 10:16:29 Shenghuo ZHU + + * gnus.texi (Mail Source Specifiers): Update maildir. + 2000-05-02 Pavel Janik * gnus.texi (MIME comands): Spelling fix. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 83cf8a8..93edfa5 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -10671,7 +10671,7 @@ POP $(B%5!<%P!<$+$i%a!<%k$r$l$N%U%!%$%k$,(B $(B@53N$K(B1$(B%a!<%k$H$J$C$F$$$^$9!#(B @@ -10679,26 +10679,28 @@ maildir $(B$+$i%a!<%k$r