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 ;(setq mime-setup-enable-inline-html nil)
96 ;; Don't split large message.
97 ;(setq mime-edit-split-message nil)
99 ;; Thread divide when change subject.
100 ;(setq wl-summary-divide-thread-when-subject-changed t)
103 ;(setq wl-thread-have-younger-brother-str "+"
104 ; wl-thread-youngest-child-str "+"
105 ; wl-thread-vertical-str "|"
106 ; wl-thread-horizontal-str "-"
107 ; wl-thread-space-str " ")
109 ;; display first message automatically.
110 ;(setq wl-auto-select-first t)
112 ;; goto next folder when exit from summary.
113 ;(setq wl-auto-select-next t)
115 ;; folder is skipped if there is no unread.
116 ;(setq wl-summary-next-no-unread 'skip-no-unread)
118 ;; jump to unread message in 'N' or 'P'.
119 ;(setq wl-summary-move-order 'unread)
125 ;; (messages in localdir, localnews, maildir are not cached.)
126 ;(setq elmo-archive-use-cache nil)
127 ;(setq elmo-nntp-use-cache t)
128 ;(setq elmo-imap4-use-cache t)
129 ;(setq elmo-pop3-use-cache t)
131 ;; Enable disconnected operation in IMAP folder.
132 ;(setq elmo-enable-disconnected-operation t)
134 ;; Store draft message in queue folder if message is sent in unplugged status.
135 (setq wl-draft-enable-queuing t)
136 ;; when plug status is changed from unplugged to plugged,
137 ;; queued message is flushed automatically.
138 (setq wl-auto-flush-queue t)
140 ;; offline at startup.
141 ;(setq wl-plugged nil)
142 ;; change plug status by server or port at startup.
143 ;(add-hook 'wl-make-plugged-hook
145 ; (elmo-set-plugged plugged(t/nil) server port)
146 ; (elmo-set-plugged plugged(t/nil) server)
150 ;;; [[ Special Setting ]]
152 ;; open unread group folder after checking.
153 ;(add-hook 'wl-folder-check-entity-hook
155 ; (wl-folder-open-unread-folder entity)
158 ;; Change summary display function.
160 ;; get extra field values as overview information (only localdir folder).
161 (setq elmo-msgdb-extra-fields '("newsgroups"
162 "x-ml-name" "list-id"
163 "x-mail-count" "x-ml-count" "x-sequence"
166 ;; ML message displays ML name and ML sequence number in subject.
167 (setq wl-summary-subject-func 'my-wl-summary-subject-func-ml)
168 (defun my-wl-summary-subject-func-ml (subject-string)
169 (let ((folder wl-summary-buffer-folder-name)
170 (subj subject-string) (sequence) (ml-name) (ml-count))
171 (setq sequence (elmo-msgdb-overview-entity-get-extra-field
173 ml-name (or (elmo-msgdb-overview-entity-get-extra-field
176 (car (split-string sequence " "))))
177 ml-count (or (elmo-msgdb-overview-entity-get-extra-field
178 entity "x-mail-count")
179 (elmo-msgdb-overview-entity-get-extra-field
182 (cadr (split-string sequence " ")))))
184 ;;; "^\\s(\\(.+\\)[ :]\\([0-9]+\\)\\s)[ \t]*"
185 "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*"
188 (setq subj (substring subject-string (match-end 0)))
189 (if (not ml-name) (setq ml-name (match-string 1 subject-string)))
190 (if (not ml-count) (setq ml-count (match-string 2 subject-string)))))
191 (if (and ml-name ml-count)
192 (if (string= folder wl-default-folder)
193 (format "(%s %05d) %s"
194 (car (split-string ml-name " "))
195 (string-to-int ml-count)
198 (string-to-int ml-count) subj))
201 ;; imput asynchronously.
202 ;; (utils/im-wl.el is needed to be installed.
203 ;; Don't forget setting ~/.im/Config (Smtpservers).
204 ;; note that wl-draft-enable-queuing is not valid.)
205 ;(autoload 'wl-draft-send-with-imput-async "im-wl")
206 ;(setq wl-draft-send-func 'wl-draft-send-with-imput-async)
209 ;; non-verbose User-Agent: field
210 ;(setq wl-generate-mailer-string-func
213 ; (wl-generate-user-agent-string-1 nil))))
219 (setq wl-template-alist
222 ("Organization" . "~/.wl sample")
223 (body . "Hello, this is XXX \n")) ;; body
225 ("To" . "boss@example.com")
226 ("Subject" . "Report")
227 (top . "Sir, here is my report\n") ;; insert in top.
228 ;; (bottom-file . "~/work/report.txt") ;; insert file in bottom
231 ;; Change headers in draft sending time.
232 (setq wl-draft-config-alist
233 '((reply ;; see reply buffer
234 "^To: .*\\(test-notsend-wl@lists.airs.net\\)"
235 (template . "default")) ;; template
236 ("^To: .*\\(test-notsend-wl@lists.airs.net\\)"
237 wl-ml-draft-config-func ;; function
238 ("From" . wl-from) ;; variable
239 ("Organization" . "~/.wl sample")) ;; string
240 ("^Newsgroups: test.*"
241 ("Organization" . "organization for nntp."))
244 ;; Change headers in draft preparation time.
245 ;(add-hook 'wl-mail-setup-hook
247 ; (unless wl-draft-reedit; ; don't apply when reedit.
248 ; (wl-draft-config-exec wl-draft-config-alist))))
252 ;; header value setting for mail reply.
254 ;; Wide window for draft buffer.
255 ;(setq wl-draft-reply-buffer-style 'full)
257 ;; Remove fullname in reply message header.
258 ;(setq wl-draft-reply-use-address-with-full-name nil)
260 ;; "a" (without-argument) reply to author (Reply-To or From).
261 ;; if 'X-ML-Name' and 'Reply-To' exists, reply to 'Reply-To'.
262 (setq wl-draft-reply-without-argument-list
263 '((("X-ML-Name" "Reply-To") . (("Reply-To") nil nil))
264 ("X-ML-Name" . (("To" "Cc") nil nil))
265 ("Followup-To" . (nil nil ("Followup-To")))
266 ("Newsgroups" . (nil nil ("Newsgroups")))
267 ("Reply-To" . (("Reply-To") nil nil))
268 ("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
269 ("From" . (("From") nil nil))))
271 ;; "C-u a" (with-argument) reply to all.
272 (setq wl-draft-reply-with-argument-list
273 '(("Followup-To" . (("From") nil ("Followup-To")))
274 ("Newsgroups" . (("From") nil ("Newsgroups")))
275 ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
276 ("From" . (("From") ("To" "Cc") ("Newsgroups")))))
279 ;; X-Face (requires x-face (and x-face-mule))
280 (when (and window-system
281 (module-installed-p 'x-face))
282 (cond (wl-on-xemacs ;; for XEmacs
283 (autoload 'x-face-xmas-wl-display-x-face "x-face" nil t)
284 (setq wl-highlight-x-face-func
285 'x-face-xmas-wl-display-x-face))
286 ;; for Mule (GNU Emacs)
287 ((module-installed-p 'x-face-mule)
288 ;; x-face-mule 0.20
\e$B0J8e
\e(B
289 (setq wl-highlight-x-face-func
291 (lambda (&rest dummy)
292 (x-face-decode-message-header))))
293 (require 'x-face-mule)
296 ;; rule for auto refile.
297 ;(setq wl-refile-rule-alist
300 ; ("^Wanderlust" . "+wl")
301 ; ("^Elisp" . "+elisp"))
303 ; ("teranisi@isl.ntt.co.jp" . "+teranisi"))))
305 ;; Marks to skip auto-refile (default is "N" "U" "!").
306 ;; nil means all message is auto-refiled.
307 ;(setq wl-summary-auto-refile-skip-marks nil)
310 ;; "all.SCORE" file is used regardless of wl-score-folder-alist.
311 ;(setq wl-score-folder-alist
318 ;; directory for storing score files.
319 ; (setq wl-score-files-directory "~/.elmo/")