2 ;;; ~/.wl (setting file for Wanderlust)
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 ;;; [[ Private Setting ]]
15 ;(setq wl-from "Your Name <e-mail@example.com>")
17 ;(setq wl-organization "")
19 ;; User's mail addresses.
20 (setq wl-user-mail-address-list
21 (list (wl-address-header-extract-address wl-from)
22 ;;"e-mail2@example.com" ...
25 ;;; [[ Basic Setting ]]
27 ;; Home directory for MH (localdir)
28 (setq elmo-localdir-folder-path "~/Mail")
29 ;; Default IMAP4 server
30 (setq elmo-default-imap4-server "localhost")
32 (setq elmo-default-pop3-server "localhost")
33 ;; Default NNTP server
34 (setq elmo-default-nntp-server "localhost")
35 ;; NNTP server name for posting
36 (setq wl-nntp-posting-server elmo-default-nntp-server)
38 (setq wl-smtp-posting-server "localhost")
40 ;; Icon directory (XEmacs)
41 ;; (No need if installed as XEmacs package.)
42 ;(setq wl-icon-dir "~/work/wl/etc")
44 ;; If (system-name) does not return FQDN,
45 ;; set following as a local domain name without hostname.
46 ;; ((system-name) "." wl-local-domain is used as domain part of Message-ID
47 ;; and an argument of HELO in SMTP.
48 ;(setq wl-local-domain "localdomain")
49 ;; Specific domain part for message-id.
50 ;(setq wl-message-id-domain "localhost.localdomain")
52 ;(setq wl-default-folder "+inbox") ;; Default folder for
53 ;; wl-summary-goto-folder.
54 ;(setq wl-default-spec "+") ;; Default string for
55 ;; folder name completion.
57 ;(setq wl-fcc "+outbox") ;; Folder Carbon Copy
59 (setq wl-interactive-exit t) ;; Confirm at exit time.
60 (setq wl-interactive-send t) ;; Confirm at message sending time.
62 (setq wl-auto-select-first t) ;; display first message automatically.
63 (setq wl-auto-select-next t) ;; goto next folder when exit from
65 ;(setq wl-summary-next-no-unread 'skip-no-unread)
66 ;; folder is skipped if there is no
69 (setq wl-summary-move-order 'unread) ;; jump to unread message in 'N' or 'P'.
70 (setq wl-thread-insert-opened t) ;; Create opened thread.
72 ;(setq wl-stay-folder-window t) ;; folder mode and summary mode is
73 ;; displayed at the same time.
76 ;; (messages in localdir, localnews, maildir are not cached.)
77 ;(setq elmo-archive-use-cache nil)
78 ;(setq elmo-nntp-use-cache nil)
79 ;(setq elmo-imap4-use-cache t)
80 ;(setq elmo-pop3-use-cache t)
82 ;; Enable disconnected operation in IMAP folder.
83 ;(setq elmo-enable-disconnected-operation t)
85 ;; Store draft message in queue folder if message is sent in unplugged status.
86 (setq wl-draft-enable-queuing t)
87 ;; when plug status is changed from unplugged to plugged,
88 ;; queued message is flushed automatically.
89 (setq wl-auto-flush-queue t)
91 ;; offline at startup.
92 ;(setq wl-plugged nil)
93 ;; change plug status by server or port at startup.
94 ;(add-hook 'wl-make-plugged-hook
96 ; (elmo-set-plugged plugged(t/nil) server port)
97 ; (elmo-set-plugged plugged(t/nil) server)
101 ;; highlight setting (for light background)
103 ;; decide group folder color by number.
104 ;(setq wl-highlight-group-folder-by-numbers nil)
106 (setq wl-highlight-message-header-alist
107 '(("Subject[ \t]*:" . wl-highlight-message-subject-header-contents)
108 ("From[ \t]*:" . wl-highlight-message-from-header-contents)
109 ("\\(.*To\\|Cc\\|Newsgroups\\)[ \t]*:" . wl-highlight-message-important-header-contents)
110 ("\\(User-Agent\\|X-Mailer\\|X-Newsreader\\)[ \t]*:" .
111 wl-highlight-message-unimportant-header-contents)
113 ;; don't change color by citation level.
114 ;(setq wl-highlight-citation-face-list
115 ; '(wl-highlight-message-cited-text-1))
117 (defun my-wl-set-face (face spec)
119 (cond ((fboundp 'face-spec-set)
120 (face-spec-set face spec))
122 (wl-declare-face face spec))))
125 (my-wl-set-face 'wl-highlight-message-subject-header-contents
126 '((t (:foreground "blue" :bold t))))
127 (my-wl-set-face 'wl-highlight-message-from-header-contents
128 '((t (:foreground "red" :bold t))))
129 (my-wl-set-face 'wl-highlight-message-important-header-contents
130 '((t (:foreground "purple" :bold t))))
131 (my-wl-set-face 'wl-highlight-message-unimportant-header-contents
132 '((t (:foreground "RoyalBlue" :bold t))))
133 (my-wl-set-face 'wl-highlight-message-headers
134 '((t (:foreground "magenta3" :bold t))))
135 (my-wl-set-face 'wl-highlight-message-header-contents
136 '((t (:foreground "brown" :bold nil))))
137 (my-wl-set-face 'wl-highlight-message-signature
138 '((t (:foreground "blue"))))
140 (my-wl-set-face 'wl-highlight-message-citation-header
141 '((t (:foreground "DarkGreen"))))
142 (my-wl-set-face 'wl-highlight-message-cited-text-1
143 '((t (:foreground "forest green"))))
144 (my-wl-set-face 'wl-highlight-message-cited-text-2
145 '((t (:foreground "SaddleBrown"))))
146 (my-wl-set-face 'wl-highlight-message-cited-text-3
147 '((t (:foreground "orchid3"))))
148 (my-wl-set-face 'wl-highlight-message-cited-text-4
149 '((t (:foreground "purple1"))))
150 (my-wl-set-face 'wl-highlight-message-cited-text-5
151 '((t (:foreground "MediumPurple1"))))
152 (my-wl-set-face 'wl-highlight-message-cited-text-6
153 '((t (:foreground "PaleVioletRed"))))
154 (my-wl-set-face 'wl-highlight-message-cited-text-7
155 '((t (:foreground "LightPink"))))
156 (my-wl-set-face 'wl-highlight-message-cited-text-8
157 '((t (:foreground "salmon"))))
158 (my-wl-set-face 'wl-highlight-message-cited-text-9
159 '((t (:foreground "SandyBrown"))))
160 (my-wl-set-face 'wl-highlight-message-cited-text-10
161 '((t (:foreground "wheat"))))
163 (my-wl-set-face 'wl-highlight-summary-important-face
164 '((t (:foreground "purple"))))
165 (my-wl-set-face 'wl-highlight-summary-new-face
166 '((t (:foreground "tomato"))))
167 (my-wl-set-face 'wl-highlight-summary-unread-face
168 '((t (:foreground "RoyalBlue"))))
169 (my-wl-set-face 'wl-highlight-summary-deleted-face
170 '((t (:foreground "gray"))))
171 (my-wl-set-face 'wl-highlight-summary-refiled-face
172 '((t (:foreground "blue"))))
173 (my-wl-set-face 'wl-highlight-summary-temp-face
174 '((t (:foreground "salmon"))))
175 (my-wl-set-face 'wl-highlight-summary-displaying-face
176 '((t (:bold t :underline t))))
178 (my-wl-set-face 'wl-highlight-summary-thread-top-face
179 '((t (:foreground "green4"))))
180 (my-wl-set-face 'wl-highlight-summary-normal-face
181 '((t (:foreground "SeaGreen"))))
183 (my-wl-set-face 'wl-highlight-folder-unknown-face
184 '((t (:foreground "RoyalBlue"))))
185 (my-wl-set-face 'wl-highlight-folder-killed-face
186 '((t (:foreground "gray50"))))
187 (my-wl-set-face 'wl-highlight-folder-unread-face
188 '((t (:foreground "brown"))))
189 (my-wl-set-face 'wl-highlight-folder-zero-face
190 '((t (:foreground "blue4"))))
191 (my-wl-set-face 'wl-highlight-folder-few-face
192 '((t (:foreground "tomato"))))
193 (my-wl-set-face 'wl-highlight-folder-many-face
194 '((t (:foreground "HotPink1"))))
196 (my-wl-set-face 'wl-highlight-folder-opened-face
197 '((t (:foreground "forest green"))))
198 (my-wl-set-face 'wl-highlight-folder-closed-face
199 '((t (:foreground "DarkOliveGreen4"))))
201 (my-wl-set-face 'wl-highlight-demo-face
202 '((t (:foreground "blue2"))))
205 ;;; [[ Special Setting ]]
207 ;; Subscribed mailing list.
208 (setq wl-subscribed-mailing-list
209 '("wl@lists.airs.net"
211 ;;"ml@example.com" ...
214 ;; compress ~/elmo using jka-compr.
215 ;(setq elmo-msgdb-overview-filename "overview.gz")
216 ;(setq elmo-msgdb-number-filename "number.gz")
217 ;(setq wl-summary-cache-file ".wl-summary-cache.gz")
218 ;(setq wl-thread-top-file ".wl-thread-top.gz")
221 ;; open unread group folder after checking.
222 (add-hook 'wl-folder-check-entity-hook
224 (wl-folder-open-unread-folder entity)
227 ;; Change summary display function.
229 ;; get extra field values as overview information (only localdir folder).
230 (setq elmo-msgdb-extra-fields '("newsgroups"
232 "x-mail-count" "x-ml-count"
236 ;;; ML message displays ML name and ML sequence number in subject.
237 (setq wl-summary-subject-func 'my-wl-summary-subject-func-ml)
238 (defun my-wl-summary-subject-func-ml (subject-string)
239 (let ((folder wl-summary-buffer-folder-name)
240 (subj subject-string) (sequence) (ml-name) (ml-count))
241 (setq sequence (elmo-msgdb-overview-entity-get-extra-field
243 ml-name (or (elmo-msgdb-overview-entity-get-extra-field
246 (car (split-string sequence " "))))
247 ml-count (or (elmo-msgdb-overview-entity-get-extra-field
248 entity "x-mail-count")
249 (elmo-msgdb-overview-entity-get-extra-field
252 (cadr (split-string sequence " ")))))
254 "^\\s(\\(.+\\)[ :]\\([0-9]+\\)\\s)[ \t]*"
257 (setq subj (substring subject-string (match-end 0)))
258 (if (not ml-name) (setq ml-name (match-string 1 subject-string)))
259 (if (not ml-count) (setq ml-count (match-string 2 subject-string)))))
260 (if (and ml-name ml-count)
261 (if (string= folder wl-default-folder)
262 (format "(%s %05d) %s"
263 (car (split-string ml-name " "))
264 (string-to-int ml-count)
267 (string-to-int ml-count) subj))
270 ;; imput asynchronously.
271 ;; (utils/im-wl.el is needed to be installed.
272 ;; Don't forget setting ~/.im/Config (Smtpservers).
273 ;; note that wl-draft-enable-queuing is not valid.)
274 ;(autoload 'wl-draft-send-with-imput-async "im-wl")
275 ;(setq wl-draft-send-func 'wl-draft-send-with-imput-async)
279 (setq wl-template-alist
282 ("Organization" . "~/.wl sample")
283 (body . "Hello, this is XXX \n")) ;; body
285 ("To" . "boss@company.jp")
286 ("Subject" . "Report")
287 (top . "Sir, here is my report\n") ;; insert in top.
288 ;; (bottom-file . "~/work/report.txt") ;; insert file in bottom
291 ;; Change headers in draft sending time.
292 (setq wl-draft-config-alist
293 '((reply ;; see reply buffer
294 "^To: .*\\(test-notsend-wl@lists.airs.net\\)"
295 (template . "default")) ;; template
296 ("^To: .*\\(test-notsend-wl@lists.airs.net\\)"
297 wl-ml-draft-config-func ;; function
298 ("From" . wl-from) ;; variable
299 ("Organization" . "~/.wl sample")) ;; string
300 ("^Newsgroups: test.*"
301 ("Organization" . "organization for nntp."))
303 ;; Change headers in draft preparation time.
304 ; (add-hook 'wl-mail-setup-hook
306 ; (unless wl-draft-reedit ;; don't apply when reedit.
307 ; (wl-draft-config-exec wl-draft-config-alist))))
309 ;; header value setting for mail reply.
311 ;; "a" (without-argument) reply to author (Reply-To or From).
312 ;; if 'X-ML-Name' and 'Reply-To' exists, reply to 'Reply-To'.
313 ; (setq wl-draft-reply-without-argument-list
314 ; '((("X-ML-Name" "Reply-To") . (("Reply-To") nil nil))
315 ; ("X-ML-Name" . (("To" "Cc") nil nil))
316 ; ("Followup-To" . (nil nil ("Followup-To")))
317 ; ("Newsgroups" . (nil nil ("Newsgroups")))
318 ; ("Reply-To" . (("Reply-To") nil nil))
319 ; ("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
320 ; ("From" . (("From") nil nil))))
322 ;; "C-u a" (with-argument) reply to all.
323 ; (setq wl-draft-reply-with-argument-list
324 ; '(("Followup-To" . (("From") nil ("Followup-To")))
325 ; ("Newsgroups" . (("From") nil ("Newsgroups")))
326 ; ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
327 ; ("From" . (("From") ("To" "Cc") ("Newsgroups")))))
330 ;; X-Face (requires x-face (and x-face-mule))
332 (when (and window-system
333 (module-installed-p 'x-face))
334 (cond (wl-on-xemacs ;; for XEmacs
335 (autoload 'x-face-xmas-wl-display-x-face "x-face" nil t)
336 (setq wl-highlight-x-face-func
337 'x-face-xmas-wl-display-x-face))
338 ((module-installed-p 'x-face-mule) ;; for Mule (GNU Emacs)
339 ;; after x-face-mule 0.20
340 (setq wl-highlight-x-face-func
342 (lambda (&optional beg end) ; for compatibility
343 (x-face-decode-message-header))))
344 (setq x-face-mule-highlight-x-face-style 'xmas)
345 (require 'x-face-mule)
348 ;; rule for auto refile.
349 ;(setq wl-refile-rule-alist
352 ; ("^Wanderlust" . "+wl")
353 ; ("^Elisp" . "+elisp"))
355 ; ("teranisi@isl.ntt.co.jp" . "+teranisi"))))
357 ;; Marks to skip auto-refile (default is "N" "U" "!").
358 ;; nil means all message is auto-refiled.
359 ;(setq wl-summary-auto-refile-skip-marks nil)
362 ;; "all.SCORE" file is used regardless of wl-score-folder-alist.
363 ; (setq wl-score-folder-alist
369 ;; directory for storing score files.
370 ; (setq wl-score-files-directory "~/.elmo/")