* wl-vars.el (wl-message-id-use-wl-from): New variable.
[elisp/wanderlust.git] / samples / en / dot.wl
index 88c8c23..0cd00aa 100644 (file)
@@ -1,9 +1,21 @@
 ;;; dot.wl -- sample setting file for Wanderlust       -*- emacs-lisp -*-
 
+;; [[ Requirement Setting ]]
+
+;; Following must be included in ~/.emacs
+;; (No need if installed as XEmacs package.)
+(autoload 'wl "wl" "Wanderlust" t)
+(autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)
+
+;; Icon directory
+;; (No need if installed as XEmacs package.)
+;(setq wl-icon-directory "/usr/local/lib/emacs/etc")
+
+
 ;; [[ SEMI Setting ]]
 
 ;; Disable inline display of HTML part.
-;; Put before (require 'mime-setup)
+;; Put before load `mime-setup'
 (setq mime-setup-enable-inline-html nil)
 
 ;; Don't split large message.
 ;(setq mime-edit-message-default-max-lines 1000)
 
 
-;; [[ Requirement Setting ]]
-
-;; Following must be included in ~/.emacs
-;; for .emacs begin
-(require 'mime-setup)
-(autoload 'wl "wl" "Wanderlust" t)
-(autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)
-;; for .emacs end
-
-;; Icon directory (XEmacs and Emacs21 only)
-;; (No need if installed as XEmacs package.)
-;(setq wl-icon-dir "/usr/local/lib/emacs/etc")
-
-
 ;;; [[ Private Setting ]]
 
 ;; Header From:
@@ -56,6 +54,9 @@
 ;; Specific domain part for message-id.
 ;(setq wl-message-id-domain "hostname.example.com")
 
+;; Use wl-from for generating message-id.
+;; wl-message-id-use-wl-from precedes wl-local-domain and wl-message-id-domain.
+;(setq wl-message-id-use-wl-from t)
 
 ;;; [[ Server Setting ]]
 
 ;; Truncate long lines.
 ;(setq wl-message-truncate-lines t)
 ;(setq wl-draft-truncate-lines t)
-;; Following line is needed for XEmacs.
+;; Following line is needed for XEmacs older than 21.4.6.
 ;(setq truncate-partial-width-windows nil)
 
 ;; Open new frame for draft buffer.
 ;(setq wl-draft-use-frame t)
 
+;; Don't limit indent for thread view
+;(setq wl-summary-indent-length-limit nil)
+;(setq wl-summary-width nil)
+
 ;; Divide thread by change of subject.
 ;(setq wl-summary-divide-thread-when-subject-changed t)
 
-;; Thread view
+;; Change format of thread view
 ;(setq wl-thread-indent-level 2)
 ;(setq wl-thread-have-younger-brother-str "+"
 ;      wl-thread-youngest-child-str     "+"
 ;(setq elmo-pop3-use-cache t)
 
 ;; Enable disconnected operation in IMAP folder.
-;(setq elmo-enable-disconnected-operation t)
+(setq elmo-enable-disconnected-operation t)
 
 ;; Store draft message in queue folder if message is sent in unplugged status.
 (setq wl-draft-enable-queuing t)
 
 ;; Change summary display function.
 
-;; get extra field values as overview information (only localdir folder).
+;; Set extra field use with `elmo-msgdb-overview-entity-get-extra-field'.
+;; And use with auto-refile.
 (setq elmo-msgdb-extra-fields
       '("newsgroups"
        "list-id" "x-ml-name" "mailing-list"
          (setq subj (substring subject-string (match-end 0)))
          (if (not ml-name) (setq ml-name (match-string 1 subject-string)))
          (if (not ml-count) (setq ml-count (match-string 2 subject-string)))))
-    (if (and ml-name ml-count)
-       (if (string= folder wl-default-folder)
-           (format "(%s %05d) %s"
-                   (car (split-string ml-name " "))
-                   (string-to-int ml-count)
-                   subj)
-         (format "#%05d %s"
-                 (string-to-int ml-count) subj))
-      subj)))
+    (condition-case nil
+       (if (and ml-name ml-count)
+           (if (string= folder wl-default-folder)
+               (format "(%s %05d) %s"
+                       (car (split-string ml-name " "))
+                       (string-to-int ml-count)
+                       subj)
+             (format "#%05d %s"
+                     (string-to-int ml-count) subj))
+         subj)
+      (error subj))))
 
 ;; imput asynchronously.
 ;; (utils/im-wl.el is needed to be installed.
 ;;; [[ Template ]]
 
 ;; template
-(setq wl-template-alist
-      '(("default"
-        ("From" . wl-from)
-        ("Organization" . "~/.wl sample")
-        (body . "Hello, this is XXX \n"))              ;; body
-       ("report"
-        ("To" . "boss@example.com")
-        ("Subject" . "Report")
-        (top . "Sir, here is my report\n")             ;; insert in top.
-;;      (bottom-file . "~/work/report.txt")    ;; insert file in bottom
-        )
-       ))
+;(setq wl-template-alist
+;      '(("default"
+;       ("From" . wl-from)
+;       ("Organization" . "organization for default")
+;       (body . "Hello, this is XXX \n")) ; body
+;      ("report"
+;       ("To" . "boss@example.com")
+;       ("Subject" . "Report")
+;       (top . "Sir, here is my report\n") ; insert in top.
+;       (bottom-file . "~/work/report.txt") ; insert file in bottom
+;       )
+;      ))
+
 ;; Change headers in draft sending time.
-(setq wl-draft-config-alist
-      '((reply         ;; see reply buffer
-        "^To: .*\\(test-notsend-wl@lists.airs.net\\)"
-        (template . "default"))                ;; template
-       ("^To: .*\\(test-notsend-wl@lists.airs.net\\)"
-        wl-ml-draft-config-function            ;; function
-        ("From" . wl-from)                     ;; variable
-        ("Organization" . "~/.wl sample"))     ;; string
-       ("^Newsgroups: test.*"
-        ("Organization" . "organization for nntp."))
-       ))
+;(setq wl-draft-config-alist
+;      '((reply                                ; see reply buffer
+;       "^To: .*test-notsend-wl@lists\\.airs\\.net"
+;       (template . "default"))        ; template
+;      ("^To: .*test-notsend-wl@lists\\.airs\\.net"
+;       ding                           ; function
+;       ("From" . wl-from)             ; variable
+;       ("Organization" . "organization")) ; string
+;      ("^Newsgroups: test.*"
+;       ("Organization" . "organization for nntp."))
+;      ))
 
 ;; Change headers in draft preparation time.
 ;(add-hook 'wl-mail-setup-hook
 ;; This value precedes `wl-message-ignored-field-list'
 (setq wl-message-visible-field-list '("^Message-Id:"))
 
-;; X-Face (requires x-face or bitmap-mule)
+;; X-Face
 (when window-system
-  (cond ((and (featurep 'xemacs)               ; for XEmacs
+  (cond ((and (featurep 'xemacs)       ; for XEmacs
              (module-installed-p 'x-face))
         (autoload 'x-face-xmas-wl-display-x-face "x-face")
         (setq wl-highlight-x-face-function 'x-face-xmas-wl-display-x-face))
-       ;; for Mule (GNU Emacs)
+
+       ;; for Emacs21
+       ((and (not (featurep 'xemacs))
+             (= emacs-major-version 21)
+             (module-installed-p 'x-face-e21))
+        (autoload 'x-face-decode-message-header "x-face-e21")
+        (setq wl-highlight-x-face-function 'x-face-decode-message-header))
+
+       ;; for Emacs 19.34, Emacs 20.x
        ((module-installed-p 'x-face-mule)
-        ;; for x-face-mule distributed with bitmap-mule 8.0 or later
+        ;; x-face-mule distributed with bitmap-mule 8.0 or later
         (autoload 'x-face-decode-message-header "x-face-mule")
         (setq wl-highlight-x-face-function 'x-face-decode-message-header))
        ))
 ;       ("^Wanderlust" . "+wl")
 ;       ("^Elisp" . "+elisp"))
 ;      ("From"
-;       ("teranisi@isl.ntt.co.jp" . "+teranisi"))))
+;       ("foo@example\\.com" . "+foo"))))
 
 ;; Marks to skip auto-refile (default is "N" "U" "!").
 ;; nil means all message is auto-refiled.