2 ;;; ~/.wl (setting file for Wanderlust)
3 ;;; Last-Modified: 1999-11-07
6 ;; Following must be included in ~/.emacs
9 (autoload 'wl "wl" "Wanderlust" t)
10 (autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)
13 ;;; [[ Private Setting ]]
16 ;(setq wl-from "Your Name <e-mail-address>")
18 ;(setq wl-organization "")
20 ;;; [[ Basic Setting ]]
22 ;; A directory for message database.
23 (setq elmo-msgdb-dir "~/.elmo")
25 ;; Home directory for MH (localdir)
26 (setq elmo-localdir-folder-path "~/Mail")
27 ;; Default IMAP4 server
28 (setq elmo-default-imap4-server "localhost")
30 (setq elmo-default-pop3-server "localhost")
31 ;; Default NNTP server
32 (setq elmo-default-nntp-server "localhost")
33 ;; NNTP server name for posting
34 (setq wl-nntp-posting-server elmo-default-nntp-server)
36 (setq wl-smtp-posting-server "localhost")
38 ;; Icon directory (XEmacs)
39 ;; (No need if installed as XEmacs package.)
40 ;(setq wl-icon-dir "~/work/wl/etc")
42 ;; If (system-name) does not return FQDN,
43 ;; set following as a local domain name without hostname.
44 ;; ((system-name) "." wl-local-domain is used as domain part of Message-ID
45 ;; and an argument of HELO in SMTP.
46 ;(setq wl-local-domain "localdomain")
47 ;; Specific domain part for message-id.
48 ;(setq wl-message-id-domain "localhost.localdomain")
50 ;(setq wl-default-folder "+inbox") ;; Default folder for
51 ;; wl-summary-goto-folder.
52 ;(setq wl-default-spec "+") ;; Default string for
53 ;; folder name completion.
55 ;(setq wl-fcc "+outbox") ;; Folder Carbon Copy
57 (setq wl-interactive-exit t) ;; Confirm at exit time.
58 (setq wl-interactive-send t) ;; Confirm at message sending time.
60 (setq wl-auto-select-first t) ;; display first message automatically.
61 (setq wl-auto-select-next t) ;; goto next folder when exit from
63 ;(setq wl-summary-next-no-unread 'skip-no-unread)
64 ;; folder is skipped if there is no
67 (setq wl-summary-move-order 'unread) ;; jump to unread message in 'N' or 'P'.
68 (setq wl-thread-insert-opened t) ;; Create opened thread.
70 ;(setq wl-stay-folder-window t) ;; folder mode and summary mode is
71 ;; displayed at the same time.
74 ;; (messages in localdir, localnews, maildir are not cached.)
75 ;(setq elmo-archive-use-cache nil)
76 ;(setq elmo-nntp-use-cache nil)
77 ;(setq elmo-imap4-use-cache t)
78 ;(setq elmo-pop3-use-cache t)
80 ;; Enable disconnected operation in IMAP folder.
81 ;(setq elmo-enable-disconnected-operation t)
83 ;; Store draft message in queue folder if message is sent in unplugged status.
84 (setq wl-draft-enable-queuing t)
85 ;; when plug status is changed from unplugged to plugged,
86 ;; queued message is flushed automatically.
87 (setq wl-auto-flush-queue t)
89 ;; offline at startup.
90 ;(setq wl-plugged nil)
91 ;; change plug status by server or port at startup.
92 ;(add-hook 'wl-make-plugged-hook
94 ; (elmo-set-plugged plugged(t/nil) server port)
95 ; (elmo-set-plugged plugged(t/nil) server)
99 ;; highlight setting (for light background)
101 ;; decide group folder color by number.
102 ;(setq wl-highlight-group-folder-by-numbers nil)
104 (setq wl-highlight-message-header-alist
105 '(("Subject[ \t]*:" . wl-highlight-message-subject-header-contents)
106 ("From[ \t]*:" . wl-highlight-message-from-header-contents)
107 ("\\(.*To\\|Cc\\|Newsgroups\\)[ \t]*:" . wl-highlight-message-important-header-contents)
108 ("\\(User-Agent\\|X-Mailer\\|X-Newsreader\\)[ \t]*:" .
109 wl-highlight-message-unimportant-header-contents)
111 ;; don't change color by citation level.
112 ;(setq wl-highlight-citation-face-list
113 ; '(wl-highlight-message-cited-text-1))
115 (defun my-wl-set-face (face spec)
117 (cond ((fboundp 'face-spec-set)
118 (face-spec-set face spec))
120 (wl-declare-face face spec))))
123 (my-wl-set-face 'wl-highlight-message-subject-header-contents
124 '((t (:foreground "blue" :bold t))))
125 (my-wl-set-face 'wl-highlight-message-from-header-contents
126 '((t (:foreground "red" :bold t))))
127 (my-wl-set-face 'wl-highlight-message-important-header-contents
128 '((t (:foreground "purple" :bold t))))
129 (my-wl-set-face 'wl-highlight-message-unimportant-header-contents
130 '((t (:foreground "RoyalBlue" :bold t))))
131 (my-wl-set-face 'wl-highlight-message-headers
132 '((t (:foreground "magenta3" :bold t))))
133 (my-wl-set-face 'wl-highlight-message-header-contents
134 '((t (:foreground "brown" :bold nil))))
135 (my-wl-set-face 'wl-highlight-message-signature
136 '((t (:foreground "blue"))))
138 (my-wl-set-face 'wl-highlight-message-citation-header
139 '((t (:foreground "DarkGreen"))))
140 (my-wl-set-face 'wl-highlight-message-cited-text-1
141 '((t (:foreground "forest green"))))
142 (my-wl-set-face 'wl-highlight-message-cited-text-2
143 '((t (:foreground "SaddleBrown"))))
144 (my-wl-set-face 'wl-highlight-message-cited-text-3
145 '((t (:foreground "orchid3"))))
146 (my-wl-set-face 'wl-highlight-message-cited-text-4
147 '((t (:foreground "purple1"))))
148 (my-wl-set-face 'wl-highlight-message-cited-text-5
149 '((t (:foreground "MediumPurple1"))))
150 (my-wl-set-face 'wl-highlight-message-cited-text-6
151 '((t (:foreground "PaleVioletRed"))))
152 (my-wl-set-face 'wl-highlight-message-cited-text-7
153 '((t (:foreground "LightPink"))))
154 (my-wl-set-face 'wl-highlight-message-cited-text-8
155 '((t (:foreground "salmon"))))
156 (my-wl-set-face 'wl-highlight-message-cited-text-9
157 '((t (:foreground "SandyBrown"))))
158 (my-wl-set-face 'wl-highlight-message-cited-text-10
159 '((t (:foreground "wheat"))))
161 (my-wl-set-face 'wl-highlight-summary-important-face
162 '((t (:foreground "purple"))))
163 (my-wl-set-face 'wl-highlight-summary-new-face
164 '((t (:foreground "tomato"))))
165 (my-wl-set-face 'wl-highlight-summary-unread-face
166 '((t (:foreground "RoyalBlue"))))
167 (my-wl-set-face 'wl-highlight-summary-deleted-face
168 '((t (:foreground "gray"))))
169 (my-wl-set-face 'wl-highlight-summary-refiled-face
170 '((t (:foreground "blue"))))
171 (my-wl-set-face 'wl-highlight-summary-temp-face
172 '((t (:foreground "salmon"))))
173 (my-wl-set-face 'wl-highlight-summary-displaying-face
174 '((t (:bold t :underline t))))
176 (my-wl-set-face 'wl-highlight-summary-thread-top-face
177 '((t (:foreground "green4"))))
178 (my-wl-set-face 'wl-highlight-summary-normal-face
179 '((t (:foreground "SeaGreen"))))
181 (my-wl-set-face 'wl-highlight-folder-unknown-face
182 '((t (:foreground "RoyalBlue"))))
183 (my-wl-set-face 'wl-highlight-folder-killed-face
184 '((t (:foreground "gray50"))))
185 (my-wl-set-face 'wl-highlight-folder-unread-face
186 '((t (:foreground "brown"))))
187 (my-wl-set-face 'wl-highlight-folder-zero-face
188 '((t (:foreground "blue4"))))
189 (my-wl-set-face 'wl-highlight-folder-few-face
190 '((t (:foreground "tomato"))))
191 (my-wl-set-face 'wl-highlight-folder-many-face
192 '((t (:foreground "HotPink1"))))
194 (my-wl-set-face 'wl-highlight-folder-opened-face
195 '((t (:foreground "forest green"))))
196 (my-wl-set-face 'wl-highlight-folder-closed-face
197 '((t (:foreground "DarkOliveGreen4"))))
199 (my-wl-set-face 'wl-highlight-demo-face
200 '((t (:foreground "blue2"))))
203 ;;; [[ Special Setting ]]
205 ;; compress ~/elmo using jka-compr.
206 ;(setq elmo-msgdb-overview-filename "overview.gz")
207 ;(setq elmo-msgdb-number-filename "number.gz")
208 ;(setq wl-summary-cache-file ".wl-summary-cache.gz")
209 ;(setq wl-thread-top-file ".wl-thread-top.gz")
212 ;; open unread group folder after checking.
213 (add-hook 'wl-folder-check-entity-hook
215 (wl-folder-open-unread-folder entity)
218 ;; User's mail addresses.
219 (setq wl-user-mail-address-list
220 (list (wl-address-header-extract-address wl-from)
221 ;;"e-mail2@bbb.com" ...
224 ;; Change summary display function.
226 ;; get extra field values as overview information (only localdir folder).
227 (setq elmo-msgdb-extra-fields '("newsgroups"
229 "x-mail-count" "x-ml-count"
233 ;;; ML message displays ML name and ML sequence number in subject.
234 (setq wl-summary-subject-func 'my-wl-summary-subject-func-ml)
235 (defun my-wl-summary-subject-func-ml (subject-string)
236 (let ((folder wl-summary-buffer-folder-name)
237 (subj subject-string) (sequence) (ml-name) (ml-count))
238 (setq sequence (elmo-msgdb-overview-entity-get-extra-field
240 ml-name (or (elmo-msgdb-overview-entity-get-extra-field
243 (car (split-string sequence " "))))
244 ml-count (or (elmo-msgdb-overview-entity-get-extra-field
245 entity "x-mail-count")
246 (elmo-msgdb-overview-entity-get-extra-field
249 (cadr (split-string sequence " ")))))
251 "^\\s(\\(.+\\)[ :]\\([0-9]+\\)\\s)[ \t]*"
254 (setq subj (substring subject-string (match-end 0)))
255 (if (not ml-name) (setq ml-name (match-string 1 subject-string)))
256 (if (not ml-count) (setq ml-count (match-string 2 subject-string)))))
257 (if (and ml-name ml-count)
258 (if (string= folder wl-default-folder)
259 (format "(%s %05d) %s"
260 (car (split-string ml-name " "))
261 (string-to-int ml-count)
264 (string-to-int ml-count) subj))
267 ;; imput asynchronously.
268 ;; (utils/im-wl.el is needed to be installed.
269 ;; Don't forget setting ~/.im/Config (Smtpservers).
270 ;; note that wl-draft-enable-queuing is not valid.)
271 ;(autoload 'wl-draft-send-with-imput-async "im-wl")
272 ;(setq wl-draft-send-func 'wl-draft-send-with-imput-async)
276 (setq wl-template-alist
279 ("Organization" . "~/.wl sample")
280 (body . "Hello, this is XXX \n")) ;; body
282 ("To" . "boss@company.jp")
283 ("Subject" . "Report")
284 (top . "Sir, here is my report\n") ;; insert in top.
285 ;; (file-bottom . "~/work/report.txt") ;; insert file in bottom
288 ;; Change headers in draft sending time.
289 (setq wl-draft-config-alist
290 '((reply ;; see reply buffer
291 "^To: .*\\(test-notsend-wl@lists.airs.net\\)"
292 (template . "default")) ;; template
293 ("^To: .*\\(test-notsend-wl@lists.airs.net\\)"
294 wl-ml-draft-config-func ;; function
295 ("From" . wl-from) ;; variable
296 ("Organization" . "~/.wl sample")) ;; string
297 ("^Newsgroups: test.*"
298 ("Organization" . "organization for nntp."))
300 ;; Change headers in draft preparation time.
301 ; (add-hook 'wl-mail-setup-hook
303 ; (unless wl-draft-reedit ;; don't apply when reedit.
304 ; (wl-draft-config-exec wl-draft-config-alist))))
306 ;; header value setting for mail reply.
308 ;; "a" (without-argument) reply to author (Reply-To or From).
309 ;; if 'X-ML-Name' and 'Reply-To' exists, reply to 'Reply-To'.
310 ; (setq wl-draft-reply-without-argument-list
311 ; '((("X-ML-Name" "Reply-To") . (("Reply-To") nil nil))
312 ; ("X-ML-Name" . (("To" "Cc") nil nil))
313 ; ("Followup-To" . (nil nil ("Followup-To")))
314 ; ("Newsgroups" . (nil nil ("Newsgroups")))
315 ; ("Reply-To" . (("Reply-To") nil nil))
316 ; ("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
317 ; ("From" . (("From") nil nil))))
319 ;; "C-u a" (with-argument) reply to all.
320 ; (setq wl-draft-reply-with-argument-list
321 ; '(("Followup-To" . (("From") nil ("Followup-To")))
322 ; ("Newsgroups" . (("From") nil ("Newsgroups")))
323 ; ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
324 ; ("From" . (("From") ("To" "Cc") ("Newsgroups")))))
327 ;; X-Face (requires x-face (and x-face-mule))
329 (when (and window-system
330 (module-installed-p 'x-face))
331 (cond (wl-on-xemacs ;; for XEmacs
332 (autoload 'x-face-xmas-wl-display-x-face "x-face" nil t)
333 (setq wl-highlight-x-face-func
334 'x-face-xmas-wl-display-x-face))
335 ((module-installed-p 'x-face-mule) ;; for Mule (GNU Emacs)
336 ;; after x-face-mule 0.20
337 (setq wl-highlight-x-face-func
340 (x-face-mule-x-face-decode-message-header beg end))))
341 (setq x-face-mule-highlight-x-face-style 'xmas)
342 (require 'x-face-mule)
345 ;; rule for auto refile.
346 ;(setq wl-refile-rule-alist
349 ; ("^Wanderlust" . "+wl")
350 ; ("^Elisp" . "+elisp"))
352 ; ("teranisi@isl.ntt.co.jp" . "+teranisi"))))
354 ;; Marks to skip auto-refile (default is "N" "U" "!").
355 ;; nil means all message is auto-refiled.
356 ;(setq wl-summary-auto-refile-skip-marks nil)
359 ;; "all.SCORE" file is used regardless of wl-score-folder-alist.
360 ; (setq wl-score-folder-alist
366 ;; directory for storing score files.
367 ; (setq wl-score-files-directory "~/.elmo/")