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