1 ;;; dot.wl -- sample setting file for Wanderlust -*- emacs-lisp -*-
5 ;; Disable inline display of HTML part.
6 ;; Put before (require 'mime-setup)
7 (setq mime-setup-enable-inline-html nil)
9 ;; Don't split large message.
10 (setq mime-edit-split-message nil)
12 ;; If lines of message are larger than this value, treat it as `large'.
13 ;(setq mime-edit-message-default-max-lines 1000)
16 ;; [[ Requirement Setting ]]
18 ;; Following must be included in ~/.emacs
21 (autoload 'wl "wl" "Wanderlust" t)
22 (autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)
25 ;; Icon directory (XEmacs and Emacs21 only)
26 ;; (No need if installed as XEmacs package.)
27 ;(setq wl-icon-dir "/usr/local/lib/emacs/etc")
30 ;;; [[ Private Setting ]]
33 ;(setq wl-from "Your Name <e-mail@example.com>")
35 ;; User's mail addresses.
36 (setq wl-user-mail-address-list
37 (list (wl-address-header-extract-address wl-from)
38 ;; "e-mail2@example.com"
39 ;; "e-mail3@example.net" ...
42 ;; Subscribed mailing list.
43 (setq wl-subscribed-mailing-list
46 "emacs-mime-ja@m17n.org"
47 ;; "ml@example.com" ...
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")
60 ;;; [[ Server Setting ]]
62 ;; Default IMAP4 server
63 (setq elmo-imap4-default-server "localhost")
65 (setq elmo-pop3-default-server "localhost")
67 (setq wl-smtp-posting-server "localhost")
68 ;; Default NNTP server
69 (setq elmo-nntp-default-server "localhost")
70 ;; NNTP server name for posting
71 (setq wl-nntp-posting-server elmo-nntp-default-server)
73 ;; IMAP authenticate type setting
74 (setq elmo-imap4-default-authenticate-type 'clear) ; raw
75 ;(setq elmo-imap4-default-authenticate-type 'cram-md5) ; CRAM-MD5
78 ;(setq wl-draft-send-mail-function 'wl-draft-send-mail-with-pop-before-smtp)
81 ;;; [[ Basic Setting ]]
83 ;; Default folder for `wl-summary-goto-folder'.
84 ;(setq wl-default-folder "+inbox")
86 ;; Default string for folder name completion.
87 ;(setq wl-default-spec "+")
90 ;(setq wl-fcc "+outbox")
92 ;; Confirm before exitting Wanderlust.
93 (setq wl-interactive-exit t)
95 ;; Confirm before sending message.
96 (setq wl-interactive-send t)
98 ;; Create opened thread.
99 ;(setq wl-thread-insert-opened t)
101 ;; Keep folder window beside summary. (3 pane)
102 ;(setq wl-stay-folder-window t)
104 ;; Truncate long lines.
105 ;(setq wl-message-truncate-lines t)
106 ;(setq wl-draft-truncate-lines t)
108 ;; Open new frame for draft buffer.
109 ;(setq wl-draft-use-frame t)
111 ;; Divide thread by change of subject.
112 ;(setq wl-summary-divide-thread-when-subject-changed t)
115 ;(setq wl-thread-indent-level 2)
116 ;(setq wl-thread-have-younger-brother-str "+"
117 ; wl-thread-youngest-child-str "+"
118 ; wl-thread-vertical-str "|"
119 ; wl-thread-horizontal-str "-"
120 ; wl-thread-space-str " ")
122 ;; display first message automatically.
123 ;(setq wl-auto-select-first t)
125 ;; goto next folder when exit from summary.
126 ;(setq wl-auto-select-next t)
128 ;; skip folder if there is no unread message.
129 ;(setq wl-auto-select-next 'skip-no-unread)
131 ;; jump to unread message in 'N' or 'P'.
132 ;(setq wl-summary-move-order 'unread)
134 ;; notify mail arrival
135 ;(setq wl-biff-check-folder-list '("%inbox"))
136 ;(setq wl-biff-notify-hook '(ding))
142 ;; (messages in localdir, localnews, maildir are not cached.)
143 ;(setq elmo-archive-use-cache nil)
144 ;(setq elmo-nntp-use-cache t)
145 ;(setq elmo-imap4-use-cache t)
146 ;(setq elmo-pop3-use-cache t)
148 ;; Enable disconnected operation in IMAP folder.
149 ;(setq elmo-enable-disconnected-operation t)
151 ;; Store draft message in queue folder if message is sent in unplugged status.
152 (setq wl-draft-enable-queuing t)
153 ;; when plug status is changed from unplugged to plugged,
154 ;; queued message is flushed automatically.
155 (setq wl-auto-flush-queue t)
157 ;; offline at startup.
158 ;(setq wl-plugged nil)
159 ;; change plug status by server or port at startup.
160 ;(add-hook 'wl-make-plugged-hook
162 ; ;; Add or Change plug status for SERVER and PORT.
163 ; (elmo-set-plugged plugged(t/nil) server port)
164 ; ;; When omit port, SEVERS all port was changes.
165 ; ;; (Can't add plug status without PORT)
166 ; (elmo-set-plugged plugged(t/nil) server)
170 ;;; [[ Special Setting ]]
172 ;; open unread group folder after checking.
173 ;(add-hook 'wl-folder-check-entity-hook
175 ; (wl-folder-open-unread-folder entity)
178 ;; Change summary display function.
180 ;; get extra field values as overview information (only localdir folder).
181 (setq elmo-msgdb-extra-fields
183 "list-id" "x-ml-name" "mailing-list"
184 "x-mail-count" "x-ml-count" "x-sequence"))
186 ;; ML message displays ML name and ML sequence number in subject.
187 (setq wl-summary-subject-function 'my-wl-summary-subject-func-ml)
188 (defun my-wl-summary-subject-func-ml (subject-string)
189 (let ((folder wl-summary-buffer-folder-name)
190 (subj subject-string) (sequence) (ml-name) (ml-count))
191 (setq sequence (elmo-msgdb-overview-entity-get-extra-field
193 ml-name (or (elmo-msgdb-overview-entity-get-extra-field
196 (car (split-string sequence " "))))
197 ml-count (or (elmo-msgdb-overview-entity-get-extra-field
198 entity "x-mail-count")
199 (elmo-msgdb-overview-entity-get-extra-field
202 (cadr (split-string sequence " ")))))
204 "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*"
207 (setq subj (substring subject-string (match-end 0)))
208 (if (not ml-name) (setq ml-name (match-string 1 subject-string)))
209 (if (not ml-count) (setq ml-count (match-string 2 subject-string)))))
210 (if (and ml-name ml-count)
211 (if (string= folder wl-default-folder)
212 (format "(%s %05d) %s"
213 (car (split-string ml-name " "))
214 (string-to-int ml-count)
217 (string-to-int ml-count) subj))
220 ;; imput asynchronously.
221 ;; (utils/im-wl.el is needed to be installed.
222 ;; Don't forget setting ~/.im/Config (Smtpservers).
223 ;; note that wl-draft-enable-queuing is not valid.)
224 ;(autoload 'wl-draft-send-with-imput-async "im-wl")
225 ;(setq wl-draft-send-function 'wl-draft-send-with-imput-async)
228 ;; non-verbose User-Agent: field
229 ;(setq wl-generate-mailer-string-function
232 ; (concat "User-Agent: "
233 ; (wl-generate-user-agent-string-1 nil)))))
239 (setq wl-template-alist
242 ("Organization" . "~/.wl sample")
243 (body . "Hello, this is XXX \n")) ;; body
245 ("To" . "boss@example.com")
246 ("Subject" . "Report")
247 (top . "Sir, here is my report\n") ;; insert in top.
248 ;; (bottom-file . "~/work/report.txt") ;; insert file in bottom
251 ;; Change headers in draft sending time.
252 (setq wl-draft-config-alist
253 '((reply ;; see reply buffer
254 "^To: .*\\(test-notsend-wl@lists.airs.net\\)"
255 (template . "default")) ;; template
256 ("^To: .*\\(test-notsend-wl@lists.airs.net\\)"
257 wl-ml-draft-config-function ;; function
258 ("From" . wl-from) ;; variable
259 ("Organization" . "~/.wl sample")) ;; string
260 ("^Newsgroups: test.*"
261 ("Organization" . "organization for nntp."))
264 ;; Change headers in draft preparation time.
265 ;(add-hook 'wl-mail-setup-hook
267 ; (unless wl-draft-reedit; ; don't apply when reedit.
268 ; (wl-draft-config-exec wl-draft-config-alist))))
272 ;; header value setting for mail reply.
274 ;; Wide window for draft buffer.
275 ;(setq wl-draft-reply-buffer-style 'full)
277 ;; Remove fullname in reply message header.
278 ;(setq wl-draft-reply-use-address-with-full-name nil)
280 ;; "a" (without-argument) reply to author (Reply-To or From).
281 ;; if 'X-ML-Name' and 'Reply-To' exists, reply to 'Reply-To'.
282 (setq wl-draft-reply-without-argument-list
283 '((("X-ML-Name" "Reply-To") . (("Reply-To") nil nil))
284 ("X-ML-Name" . (("To" "Cc") nil nil))
285 ("Followup-To" . (nil nil ("Followup-To")))
286 ("Newsgroups" . (nil nil ("Newsgroups")))
287 ("Reply-To" . (("Reply-To") nil nil))
288 ("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
289 ("From" . (("From") nil nil))))
291 ;; "C-u a" (with-argument) reply to all.
292 (setq wl-draft-reply-with-argument-list
293 '(("Followup-To" . (("From") nil ("Followup-To")))
294 ("Newsgroups" . (("From") nil ("Newsgroups")))
295 ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
296 ("From" . (("From") ("To" "Cc") ("Newsgroups")))))
299 ;;; [[ Message Display Settings ]]
301 ;; Hidden header field in message buffer.
302 (setq wl-message-ignored-field-list
303 '(".*Received:" ".*Path:" ".*Id:" "^References:"
304 "^Replied:" "^Errors-To:"
305 "^Lines:" "^Sender:" ".*Host:" "^Xref:"
306 "^Content-Type:" "^Precedence:"
307 "^Status:" "^X-VM-.*:"))
309 ;; Displayed header field in message buffer.
310 ;; This value precedes `wl-message-ignored-field-list'
311 (setq wl-message-visible-field-list '("^Message-Id:"))
313 ;; X-Face (requires x-face or bitmap-mule)
315 (cond ((and (featurep 'xemacs) ; for XEmacs
316 (module-installed-p 'x-face))
317 (autoload 'x-face-xmas-wl-display-x-face "x-face")
318 (setq wl-highlight-x-face-function 'x-face-xmas-wl-display-x-face))
319 ;; for Mule (GNU Emacs)
320 ((module-installed-p 'x-face-mule)
321 ;; for x-face-mule distributed with bitmap-mule 8.0 or later
322 (autoload 'x-face-decode-message-header "x-face-mule")
323 (setq wl-highlight-x-face-function 'x-face-decode-message-header))
327 ;; "all.SCORE" file is used regardless of wl-score-folder-alist.
328 ;(setq wl-score-folder-alist
335 ;; rule for auto refile.
336 ;(setq wl-refile-rule-alist
339 ; ("^Wanderlust" . "+wl")
340 ; ("^Elisp" . "+elisp"))
342 ; ("teranisi@isl.ntt.co.jp" . "+teranisi"))))
344 ;; Marks to skip auto-refile (default is "N" "U" "!").
345 ;; nil means all message is auto-refiled.
346 ;(setq wl-summary-auto-refile-skip-marks nil)