1 ;;; dot.wl -- sample setting file for Wanderlust -*- emacs-lisp -*-
5 ;; Disable inline display 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 is larger than this value, message is `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 at exit time.
93 (setq wl-interactive-exit t)
95 ;; Confirm at message sending time.
96 (setq wl-interactive-send t)
98 ;; Create opened thread.
99 ;(setq wl-thread-insert-opened t)
101 ;; folder mode and summary mode is displayed at the same time. (3pane)
102 ;(setq wl-stay-folder-window t)
104 ;; Open new frame for draft buffer.
105 ;(setq wl-draft-use-frame t)
107 ;; Thread divide when change subject.
108 ;(setq wl-summary-divide-thread-when-subject-changed t)
111 ;(setq wl-thread-have-younger-brother-str "+"
112 ; wl-thread-youngest-child-str "+"
113 ; wl-thread-vertical-str "|"
114 ; wl-thread-horizontal-str "-"
115 ; wl-thread-space-str " ")
117 ;; display first message automatically.
118 ;(setq wl-auto-select-first t)
120 ;; goto next folder when exit from summary.
121 ;(setq wl-auto-select-next t)
123 ;; folder is skipped if there is no unread.
124 ;(setq wl-summary-next-no-unread 'skip-no-unread)
126 ;; jump to unread message in 'N' or 'P'.
127 ;(setq wl-summary-move-order 'unread)
133 ;; (messages in localdir, localnews, maildir are not cached.)
134 ;(setq elmo-archive-use-cache nil)
135 ;(setq elmo-nntp-use-cache t)
136 ;(setq elmo-imap4-use-cache t)
137 ;(setq elmo-pop3-use-cache t)
139 ;; Enable disconnected operation in IMAP folder.
140 ;(setq elmo-enable-disconnected-operation t)
142 ;; Store draft message in queue folder if message is sent in unplugged status.
143 (setq wl-draft-enable-queuing t)
144 ;; when plug status is changed from unplugged to plugged,
145 ;; queued message is flushed automatically.
146 (setq wl-auto-flush-queue t)
148 ;; offline at startup.
149 ;(setq wl-plugged nil)
150 ;; change plug status by server or port at startup.
151 ;(add-hook 'wl-make-plugged-hook
153 ; ;; Add or Change plug status for SERVER and PORT.
154 ; (elmo-set-plugged plugged(t/nil) server port)
155 ; ;; When omit port, SEVERS all port was changes.
156 ; ;; (Can't add plug status without PORT)
157 ; (elmo-set-plugged plugged(t/nil) server)
161 ;;; [[ Special Setting ]]
163 ;; open unread group folder after checking.
164 ;(add-hook 'wl-folder-check-entity-hook
166 ; (wl-folder-open-unread-folder entity)
169 ;; Change summary display function.
171 ;; get extra field values as overview information (only localdir folder).
172 (setq elmo-msgdb-extra-fields
174 "list-id" "x-ml-name" "mailing-list"
175 "x-mail-count" "x-ml-count" "x-sequence"))
177 ;; ML message displays ML name and ML sequence number in subject.
178 (setq wl-summary-subject-function 'my-wl-summary-subject-func-ml)
179 (defun my-wl-summary-subject-func-ml (subject-string)
180 (let ((folder wl-summary-buffer-folder-name)
181 (subj subject-string) (sequence) (ml-name) (ml-count))
182 (setq sequence (elmo-msgdb-overview-entity-get-extra-field
184 ml-name (or (elmo-msgdb-overview-entity-get-extra-field
187 (car (split-string sequence " "))))
188 ml-count (or (elmo-msgdb-overview-entity-get-extra-field
189 entity "x-mail-count")
190 (elmo-msgdb-overview-entity-get-extra-field
193 (cadr (split-string sequence " ")))))
195 ;;; "^\\s(\\(.+\\)[ :]\\([0-9]+\\)\\s)[ \t]*"
196 "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*"
199 (setq subj (substring subject-string (match-end 0)))
200 (if (not ml-name) (setq ml-name (match-string 1 subject-string)))
201 (if (not ml-count) (setq ml-count (match-string 2 subject-string)))))
202 (if (and ml-name ml-count)
203 (if (string= folder wl-default-folder)
204 (format "(%s %05d) %s"
205 (car (split-string ml-name " "))
206 (string-to-int ml-count)
209 (string-to-int ml-count) subj))
212 ;; imput asynchronously.
213 ;; (utils/im-wl.el is needed to be installed.
214 ;; Don't forget setting ~/.im/Config (Smtpservers).
215 ;; note that wl-draft-enable-queuing is not valid.)
216 ;(autoload 'wl-draft-send-with-imput-async "im-wl")
217 ;(setq wl-draft-send-function 'wl-draft-send-with-imput-async)
220 ;; non-verbose User-Agent: field
221 ;(setq wl-generate-mailer-string-function
224 ; (concat "User-Agent: "
225 ; (wl-generate-user-agent-string-1 nil)))))
231 (setq wl-template-alist
234 ("Organization" . "~/.wl sample")
235 (body . "Hello, this is XXX \n")) ;; body
237 ("To" . "boss@example.com")
238 ("Subject" . "Report")
239 (top . "Sir, here is my report\n") ;; insert in top.
240 ;; (bottom-file . "~/work/report.txt") ;; insert file in bottom
243 ;; Change headers in draft sending time.
244 (setq wl-draft-config-alist
245 '((reply ;; see reply buffer
246 "^To: .*\\(test-notsend-wl@lists.airs.net\\)"
247 (template . "default")) ;; template
248 ("^To: .*\\(test-notsend-wl@lists.airs.net\\)"
249 wl-ml-draft-config-function ;; function
250 ("From" . wl-from) ;; variable
251 ("Organization" . "~/.wl sample")) ;; string
252 ("^Newsgroups: test.*"
253 ("Organization" . "organization for nntp."))
256 ;; Change headers in draft preparation time.
257 ;(add-hook 'wl-mail-setup-hook
259 ; (unless wl-draft-reedit; ; don't apply when reedit.
260 ; (wl-draft-config-exec wl-draft-config-alist))))
264 ;; header value setting for mail reply.
266 ;; Wide window for draft buffer.
267 ;(setq wl-draft-reply-buffer-style 'full)
269 ;; Remove fullname in reply message header.
270 ;(setq wl-draft-reply-use-address-with-full-name nil)
272 ;; "a" (without-argument) reply to author (Reply-To or From).
273 ;; if 'X-ML-Name' and 'Reply-To' exists, reply to 'Reply-To'.
274 (setq wl-draft-reply-without-argument-list
275 '((("X-ML-Name" "Reply-To") . (("Reply-To") nil nil))
276 ("X-ML-Name" . (("To" "Cc") nil nil))
277 ("Followup-To" . (nil nil ("Followup-To")))
278 ("Newsgroups" . (nil nil ("Newsgroups")))
279 ("Reply-To" . (("Reply-To") nil nil))
280 ("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
281 ("From" . (("From") nil nil))))
283 ;; "C-u a" (with-argument) reply to all.
284 (setq wl-draft-reply-with-argument-list
285 '(("Followup-To" . (("From") nil ("Followup-To")))
286 ("Newsgroups" . (("From") nil ("Newsgroups")))
287 ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
288 ("From" . (("From") ("To" "Cc") ("Newsgroups")))))
291 ;;; [[ Message Display Settings ]]
293 ;; Hidden header field in message buffer.
294 (setq wl-message-ignored-field-list
295 '(".*Received:" ".*Path:" ".*Id:" "^References:"
296 "^Replied:" "^Errors-To:"
297 "^Lines:" "^Sender:" ".*Host:" "^Xref:"
298 "^Content-Type:" "^Precedence:"
299 "^Status:" "^X-VM-.*:"))
301 ;; Displayed header field in message buffer.
302 ;; This value precedes `wl-message-ignored-field-list'
303 (setq wl-message-visible-field-list '("^Message-Id:"))
305 ;; X-Face (requires x-face (and x-face-mule))
306 (when (and window-system
307 (module-installed-p 'x-face))
308 (cond ((featurep 'xemacs) ; for XEmacs
309 (autoload 'x-face-xmas-wl-display-x-face "x-face" nil t)
310 (setq wl-highlight-x-face-function 'x-face-xmas-wl-display-x-face))
311 ;; for Mule (GNU Emacs)
312 ((module-installed-p 'x-face-mule)
313 ;; x-face-mule 0.20 or later
314 (setq wl-highlight-x-face-function
316 (lambda (&rest dummy)
317 (x-face-decode-message-header))))
318 (require 'x-face-mule))
322 ;; "all.SCORE" file is used regardless of wl-score-folder-alist.
323 ;(setq wl-score-folder-alist
330 ;; rule for auto refile.
331 ;(setq wl-refile-rule-alist
334 ; ("^Wanderlust" . "+wl")
335 ; ("^Elisp" . "+elisp"))
337 ; ("teranisi@isl.ntt.co.jp" . "+teranisi"))))
339 ;; Marks to skip auto-refile (default is "N" "U" "!").
340 ;; nil means all message is auto-refiled.
341 ;(setq wl-summary-auto-refile-skip-marks nil)