1 ;;; dot.wl -- sample setting file for Wanderlust -*- emacs-lisp -*-
3 ;; [[ Requirement Setting ]]
5 ;; Following must be included in ~/.emacs
8 (autoload 'wl "wl" "Wanderlust" t)
9 (autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)
12 ;; Icon directory (XEmacs and Emacs21 only)
13 ;; (No need if installed as XEmacs package.)
14 ;(setq wl-icon-dir "/usr/local/lib/emacs/etc")
17 ;;; [[ Private Setting ]]
20 ;(setq wl-from "Your Name <e-mail@example.com>")
22 ;; User's mail addresses.
23 (setq wl-user-mail-address-list
24 (list (wl-address-header-extract-address wl-from)
25 ;; "e-mail2@example.com"
26 ;; "e-mail3@example.net" ...
29 ;; Subscribed mailing list.
30 (setq wl-subscribed-mailing-list
33 ;;"ml@example.com" ...
37 ;;; [[ Server Setting ]]
39 ;; Default IMAP4 server
40 (setq elmo-default-imap4-server "localhost")
42 (setq elmo-default-pop3-server "localhost")
44 (setq wl-smtp-posting-server "localhost")
45 ;; Default NNTP server
46 (setq elmo-default-nntp-server "localhost")
47 ;; NNTP server name for posting
48 (setq wl-nntp-posting-server elmo-default-nntp-server)
50 ;; If (system-name) does not return FQDN,
51 ;; set following as a local domain name without hostname.
52 ;; ((system-name) "." wl-local-domain is used as domain part of Message-ID
53 ;; and an argument of HELO in SMTP.
54 ;(setq wl-local-domain "example.com")
56 ;; Specific domain part for message-id.
57 ;(setq wl-message-id-domain "hostname.example.com")
59 ;; IMAP authenticate type setting
60 (setq elmo-default-imap4-authenticate-type 'clear) ; raw
61 ;(setq elmo-default-imap4-authenticate-type 'cram-md5) ; CRAM-MD5
64 ;(setq wl-draft-send-mail-func 'wl-draft-send-mail-with-pop-before-smtp)
67 ;;; [[ Basic Setting ]]
69 ;; Default folder for `wl-summary-goto-folder'.
70 ;(setq wl-default-folder "+inbox")
72 ;; Default string for folder name completion.
73 ;(setq wl-default-spec "+")
76 ;(setq wl-fcc "+outbox")
78 ;; Confirm at exit time.
79 (setq wl-interactive-exit t)
81 ;; Confirm at message sending time.
82 (setq wl-interactive-send t)
84 ;; Create opened thread.
85 ;(setq wl-thread-insert-opened t)
87 ;; folder mode and summary mode is displayed at the same time. (3pane)
88 ;(setq wl-stay-folder-window t)
90 ;; Open new frame for draft buffer.
91 ;(setq wl-draft-use-frame t)
93 ;; Disable inline display HTML part.
94 ;; Put before (require 'mime-setup)
95 ;(setq mime-setup-enable-inline-html nil)
97 ;; Don't split large message.
98 ;(setq mime-edit-split-message nil)
100 ;; Thread divide when change subject.
101 ;(setq wl-summary-divide-thread-when-subject-changed t)
104 ;(setq wl-thread-have-younger-brother-str "+"
105 ; wl-thread-youngest-child-str "+"
106 ; wl-thread-vertical-str "|"
107 ; wl-thread-horizontal-str "-"
108 ; wl-thread-space-str " ")
110 ;; display first message automatically.
111 ;(setq wl-auto-select-first t)
113 ;; goto next folder when exit from summary.
114 ;(setq wl-auto-select-next t)
116 ;; folder is skipped if there is no unread.
117 ;(setq wl-summary-next-no-unread 'skip-no-unread)
119 ;; jump to unread message in 'N' or 'P'.
120 ;(setq wl-summary-move-order 'unread)
126 ;; (messages in localdir, localnews, maildir are not cached.)
127 ;(setq elmo-archive-use-cache nil)
128 ;(setq elmo-nntp-use-cache t)
129 ;(setq elmo-imap4-use-cache t)
130 ;(setq elmo-pop3-use-cache t)
132 ;; Enable disconnected operation in IMAP folder.
133 ;(setq elmo-enable-disconnected-operation t)
135 ;; Store draft message in queue folder if message is sent in unplugged status.
136 (setq wl-draft-enable-queuing t)
137 ;; when plug status is changed from unplugged to plugged,
138 ;; queued message is flushed automatically.
139 (setq wl-auto-flush-queue t)
141 ;; offline at startup.
142 ;(setq wl-plugged nil)
143 ;; change plug status by server or port at startup.
144 ;(add-hook 'wl-make-plugged-hook
146 ; (elmo-set-plugged plugged(t/nil) server port)
147 ; (elmo-set-plugged plugged(t/nil) server)
151 ;;; [[ Special Setting ]]
153 ;; open unread group folder after checking.
154 ;(add-hook 'wl-folder-check-entity-hook
156 ; (wl-folder-open-unread-folder entity)
159 ;; Change summary display function.
161 ;; get extra field values as overview information (only localdir folder).
162 (setq elmo-msgdb-extra-fields '("newsgroups"
163 "x-ml-name" "list-id"
164 "x-mail-count" "x-ml-count" "x-sequence"
167 ;; ML message displays ML name and ML sequence number in subject.
168 (setq wl-summary-subject-func 'my-wl-summary-subject-func-ml)
169 (defun my-wl-summary-subject-func-ml (subject-string)
170 (let ((folder wl-summary-buffer-folder-name)
171 (subj subject-string) (sequence) (ml-name) (ml-count))
172 (setq sequence (elmo-msgdb-overview-entity-get-extra-field
174 ml-name (or (elmo-msgdb-overview-entity-get-extra-field
177 (car (split-string sequence " "))))
178 ml-count (or (elmo-msgdb-overview-entity-get-extra-field
179 entity "x-mail-count")
180 (elmo-msgdb-overview-entity-get-extra-field
183 (cadr (split-string sequence " ")))))
185 ;;; "^\\s(\\(.+\\)[ :]\\([0-9]+\\)\\s)[ \t]*"
186 "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*"
189 (setq subj (substring subject-string (match-end 0)))
190 (if (not ml-name) (setq ml-name (match-string 1 subject-string)))
191 (if (not ml-count) (setq ml-count (match-string 2 subject-string)))))
192 (if (and ml-name ml-count)
193 (if (string= folder wl-default-folder)
194 (format "(%s %05d) %s"
195 (car (split-string ml-name " "))
196 (string-to-int ml-count)
199 (string-to-int ml-count) subj))
202 ;; imput asynchronously.
203 ;; (utils/im-wl.el is needed to be installed.
204 ;; Don't forget setting ~/.im/Config (Smtpservers).
205 ;; note that wl-draft-enable-queuing is not valid.)
206 ;(autoload 'wl-draft-send-with-imput-async "im-wl")
207 ;(setq wl-draft-send-func 'wl-draft-send-with-imput-async)
210 ;; non-verbose User-Agent: field
211 ;(setq wl-generate-mailer-string-func
214 ; (wl-generate-user-agent-string-1 nil))))
220 (setq wl-template-alist
223 ("Organization" . "~/.wl sample")
224 (body . "Hello, this is XXX \n")) ;; body
226 ("To" . "boss@example.com")
227 ("Subject" . "Report")
228 (top . "Sir, here is my report\n") ;; insert in top.
229 ;; (bottom-file . "~/work/report.txt") ;; insert file in bottom
232 ;; Change headers in draft sending time.
233 (setq wl-draft-config-alist
234 '((reply ;; see reply buffer
235 "^To: .*\\(test-notsend-wl@lists.airs.net\\)"
236 (template . "default")) ;; template
237 ("^To: .*\\(test-notsend-wl@lists.airs.net\\)"
238 wl-ml-draft-config-func ;; function
239 ("From" . wl-from) ;; variable
240 ("Organization" . "~/.wl sample")) ;; string
241 ("^Newsgroups: test.*"
242 ("Organization" . "organization for nntp."))
245 ;; Change headers in draft preparation time.
246 ;(add-hook 'wl-mail-setup-hook
248 ; (unless wl-draft-reedit; ; don't apply when reedit.
249 ; (wl-draft-config-exec wl-draft-config-alist))))
253 ;; header value setting for mail reply.
255 ;; Wide window for draft buffer.
256 ;(setq wl-draft-reply-buffer-style 'full)
258 ;; Remove fullname in reply message header.
259 ;(setq wl-draft-reply-use-address-with-full-name nil)
261 ;; "a" (without-argument) reply to author (Reply-To or From).
262 ;; if 'X-ML-Name' and 'Reply-To' exists, reply to 'Reply-To'.
263 (setq wl-draft-reply-without-argument-list
264 '((("X-ML-Name" "Reply-To") . (("Reply-To") nil nil))
265 ("X-ML-Name" . (("To" "Cc") nil nil))
266 ("Followup-To" . (nil nil ("Followup-To")))
267 ("Newsgroups" . (nil nil ("Newsgroups")))
268 ("Reply-To" . (("Reply-To") nil nil))
269 ("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
270 ("From" . (("From") nil nil))))
272 ;; "C-u a" (with-argument) reply to all.
273 (setq wl-draft-reply-with-argument-list
274 '(("Followup-To" . (("From") nil ("Followup-To")))
275 ("Newsgroups" . (("From") nil ("Newsgroups")))
276 ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
277 ("From" . (("From") ("To" "Cc") ("Newsgroups")))))
280 ;; X-Face (requires x-face (and x-face-mule))
281 (when (and window-system
282 (module-installed-p 'x-face))
283 (cond (wl-on-xemacs ;; for XEmacs
284 (autoload 'x-face-xmas-wl-display-x-face "x-face" nil t)
285 (setq wl-highlight-x-face-func
286 'x-face-xmas-wl-display-x-face))
287 ;; for Mule (GNU Emacs)
288 ((module-installed-p 'x-face-mule)
289 ;; x-face-mule 0.20
\e$B0J8e
\e(B
290 (setq wl-highlight-x-face-func
292 (lambda (&rest dummy)
293 (x-face-decode-message-header))))
294 (require 'x-face-mule)
297 ;; rule for auto refile.
298 ;(setq wl-refile-rule-alist
301 ; ("^Wanderlust" . "+wl")
302 ; ("^Elisp" . "+elisp"))
304 ; ("teranisi@isl.ntt.co.jp" . "+teranisi"))))
306 ;; Marks to skip auto-refile (default is "N" "U" "!").
307 ;; nil means all message is auto-refiled.
308 ;(setq wl-summary-auto-refile-skip-marks nil)
311 ;; "all.SCORE" file is used regardless of wl-score-folder-alist.
312 ;(setq wl-score-folder-alist
319 ;; directory for storing score files.
320 ; (setq wl-score-files-directory "~/.elmo/")