* wl.el (wl): Call `wl-check-environment' before `wl-plugged-init'.
authorteranisi <teranisi>
Mon, 1 Oct 2001 07:29:28 +0000 (07:29 +0000)
committerteranisi <teranisi>
Mon, 1 Oct 2001 07:29:28 +0000 (07:29 +0000)
* elmo-nmz.el (toplevel): Require 'mime-edit.
(elmo-nmz-content-type-alist): Abolished.
(elmo-nmz-msgdb-create-entity): Add From: and Subject: field if
content is not a message.
(elmo-map-message-fetch): Changed behavior exept for message content;
Detect mime-charset automatically, Use `mime-find-file-type' to detect
content-type, Add From: and Subject: field.

* NEWS.ja: Added ACAP description.

ChangeLog
NEWS.ja
elmo/ChangeLog
elmo/elmo-nmz.el
wl/ChangeLog
wl/wl.el

index 3d7ff59..933c8f6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2001-10-01  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * NEWS.ja: Added ACAP description.
+
 2001-09-04  TAKAHASHI Kaoru  <kaoru@kaisei.org>
 
        * WL-MK (toplevel): Ignore Nemacs.
diff --git a/NEWS.ja b/NEWS.ja
index 2f5a043..b7dc2a1 100644 (file)
--- a/NEWS.ja
+++ b/NEWS.ja
@@ -13,6 +13,8 @@ Wanderlust NEWS (\e$BF|K\8lHG\e(B) -- User-visible changes in Wanderlust.
 
   \e$B=q<0\e(B:  '[' 'namazu \e$B8!:w<0\e(B' ']' [ 'namazu index \e$B$N%Q%9!J@dBP%Q%9!K\e(B' ]
 
+* ACAP (RFC2244) \e$B$KBP1~$7$^$7$?\e(B(\e$B<B83E*\e(B)\e$B!#\e(B
+
 * IMAP4 \e$B$N%a%C%;!<%8$r%Q!<%HKh$K%-%c%C%7%e$H$7$FJ]B8$G$-$k$h$&$K$J$j$^$7$?!#\e(B
   \e$B5pBg$J%Q!<%H$r%9%-%C%W$7$?>l9g$G$b!"%9%-%C%W$7$?%Q!<%H0J30$O\e(B
   \e$B%*%U%i%$%s>uBV$GFI$_JV$9$3$H$,$G$-$k$h$&$K$J$j$^$7$?!#\e(B
index 1b2caa7..81fc922 100644 (file)
@@ -1,3 +1,13 @@
+2001-10-01  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo-nmz.el (toplevel): Require 'mime-edit.
+       (elmo-nmz-content-type-alist): Abolished.
+       (elmo-nmz-msgdb-create-entity): Add From: and Subject: field if
+       content is not a message.
+       (elmo-map-message-fetch): Changed behavior exept for message content;
+       Detect mime-charset automatically, Use `mime-find-file-type' to detect
+       content-type, Add From: and Subject: field.
+
 2001-09-29  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
        * elmo-nmz.el (elmo-nmz-content-type-alist): New variable.
index 0fc85ef..c13e505 100644 (file)
@@ -30,6 +30,7 @@
 ;; 
 (require 'elmo)
 (require 'elmo-map)
+(require 'mime-edit)
 
 (defcustom elmo-nmz-default-index-path "~/Mail"
   "*Default index path for namazu."
@@ -51,9 +52,6 @@
   :type '(repeat string)
   :group 'elmo)
 
-(defvar elmo-nmz-content-type-alist '(("\.html?\\'" . "text/html"))
-  "*An alist of (REGEXP . Content-Type) related filename.")
-
 ;;; "namazu search"
 (eval-and-compile
   (luna-define-class elmo-nmz-folder
 
 (defun elmo-nmz-msgdb-create-entity (folder number)
   "Create msgdb entity for the message in the FOLDER with NUMBER."
-  (elmo-msgdb-create-overview-entity-from-file
-   number
-   (elmo-map-message-location folder number)))
+  (let ((location (elmo-map-message-location folder number))
+       entity uid)
+    (setq entity (elmo-msgdb-create-overview-entity-from-file number location))
+    (unless (or (> (length (elmo-msgdb-overview-entity-get-to entity)) 0)
+               (> (length (elmo-msgdb-overview-entity-get-cc entity)) 0)
+               (not (string= (elmo-msgdb-overview-entity-get-subject entity)
+                             elmo-no-subject)))
+      (elmo-msgdb-overview-entity-set-subject entity location)
+      (setq uid (nth 2 (file-attributes location)))
+      (elmo-msgdb-overview-entity-set-from entity
+                                          (concat 
+                                           (user-full-name uid)
+                                           " <"(user-login-name uid) "@"
+                                           (system-name) ">")))
+    entity))
 
 (luna-define-method elmo-folder-msgdb-create ((folder elmo-nmz-folder)
                                              numlist new-mark
   (when (file-exists-p location)
     (insert-file-contents-as-binary location)
     (unless (or (std11-field-body "To")
-               (std11-field-body "Resent-To")
                (std11-field-body "Cc")
-               (std11-field-body "Bcc")
-               (std11-field-body "Newsgroups"))
-      (erase-buffer)
-      (set-buffer-multibyte t)
-      (insert-file-contents location)
-      (goto-char (point-min))
-      (insert "Content-Type: "
-             (or (cdr (elmo-string-matched-assoc
-                       location
-                       elmo-nmz-content-type-alist))
-                 "text/plain")
-             "; charset=ISO-2022-JP\nMIME-Version: 1.0\n\n")
-      (encode-coding-region (point-min) (point-max)
-                           (mime-charset-to-coding-system "ISO-2022-JP"))
-      (set-buffer-multibyte nil))))
+               (std11-field-body "Subject"))
+      (let (charset guess uid)
+       (erase-buffer)
+       (set-buffer-multibyte t)
+       (insert-file-contents location)
+       (setq charset (detect-mime-charset-region (point-min)
+                                                 (point-max)))
+       (goto-char (point-min))
+       (setq guess (mime-find-file-type location))
+       (setq uid (nth 2 (file-attributes location)))
+       (insert "From: " (concat (user-full-name uid)
+                                " <"(user-login-name uid) "@"
+                                (system-name) ">") "\n")
+       (insert "Subject: " location "\n")
+       (insert "Content-Type: "
+               (concat (nth 0 guess) "/" (nth 1 guess))
+               "; charset=" (upcase (symbol-name charset))
+               "\nMIME-Version: 1.0\n\n")
+       (encode-mime-charset-region (point-min) (point-max) charset)
+       (set-buffer-multibyte nil)))))
 
 (luna-define-method elmo-map-folder-list-message-locations
   ((folder elmo-nmz-folder))
index ef3256b..558616c 100644 (file)
@@ -1,3 +1,7 @@
+2001-10-01  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl.el (wl): Call `wl-check-environment' before `wl-plugged-init'.
+
 2001-09-28  TAKAHASHI Kaoru  <kaoru@kaisei.org>
 
        * wl.el (wl-toggle-plugged): Use `not' instead of `null' for
index 92e34c2..af68ce4 100644 (file)
--- a/wl/wl.el
+++ b/wl/wl.el
@@ -763,7 +763,6 @@ If ARG (prefix argument) is specified, folder checkings are skipped."
     (wl-init)
     (condition-case obj
        (progn
-         (wl-plugged-init (wl-folder arg))
          (if check
              (condition-case nil
                  (progn
@@ -772,6 +771,7 @@ If ARG (prefix argument) is specified, folder checkings are skipped."
                    (message "Checking environment...done"))
                (error)
                (quit)))
+         (wl-plugged-init (wl-folder arg))
          (unless arg
            (run-hooks 'wl-auto-check-folder-pre-hook)
            (wl-folder-auto-check)