Sync with the revision 1.52 of samples/ja/dot.wl.
[elisp/wanderlust.git] / samples / en / dot.wl
1 ;;; dot.wl -- sample setting file for Wanderlust        -*- emacs-lisp -*-
2
3 ;; [[ Requirement Setting ]]
4
5 ;; Following must be included in ~/.emacs
6 ;; (No need if installed as XEmacs package.)
7 (autoload 'wl "wl" "Wanderlust" t)
8 (autoload 'wl-other-frame "wl" "Wanderlust on new frame." t)
9 (autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)
10
11 ;; Icon directory
12 ;; (No need if installed as XEmacs package.)
13 ;(setq wl-icon-directory "/usr/local/lib/emacs/etc")
14
15
16 ;; [[ SEMI Setting ]]
17
18 ;; Disable inline display of HTML part.
19 ;; Put before load `mime-setup'
20 (setq mime-setup-enable-inline-html nil)
21
22 ;; Don't split large message.
23 (setq mime-edit-split-message nil)
24
25 ;; If lines of message are larger than this value, treat it as `large'.
26 ;(setq mime-edit-message-default-max-lines 1000)
27
28
29 ;;; [[ Private Setting ]]
30
31 ;; Header From:
32 ;(setq wl-from "Your Name <e-mail@example.com>")
33
34 ;; If (system-name) does not return FQDN,
35 ;; set following as a local domain name without hostname.
36 ;(setq wl-local-domain "example.com")
37
38 ;; User's mail addresses.
39 (setq wl-user-mail-address-list
40       (list (wl-address-header-extract-address wl-from)
41             ;; "e-mail2@example.com"
42             ;; "e-mail3@example.net" ...
43             ))
44
45 ;; Subscribed mailing list.
46 (setq wl-subscribed-mailing-list
47       '("wl@lists.airs.net"
48         "apel-ja@m17n.org"
49         "emacs-mime-ja@m17n.org"
50         ;; "ml@example.com" ...
51         ))
52
53 ;;; [[ Server Setting ]]
54
55 ;; Default IMAP4 server
56 (setq elmo-imap4-default-server "localhost")
57 ;; Default POP server
58 (setq elmo-pop3-default-server "localhost")
59 ;; SMTP server
60 (setq wl-smtp-posting-server "localhost")
61 ;; Default NNTP server
62 (setq elmo-nntp-default-server "localhost")
63 ;; NNTP server name for posting
64 (setq wl-nntp-posting-server elmo-nntp-default-server)
65
66 ;; IMAP authenticate type setting
67 (setq elmo-imap4-default-authenticate-type 'clear) ; raw
68 ;(setq elmo-imap4-default-authenticate-type 'cram-md5) ; CRAM-MD5
69
70 ;; POP-before-SMTP
71 ;(setq wl-draft-send-mail-function 'wl-draft-send-mail-with-pop-before-smtp)
72
73
74 ;;; [[ Basic Setting ]]
75
76 ;; Default folder for `wl-summary-goto-folder'.
77 ;(setq wl-default-folder "+inbox")
78
79 ;; Default string for folder name completion.
80 ;(setq wl-default-spec "+")
81
82 ;; Folder Carbon Copy
83 ;(setq wl-fcc "+outbox")
84
85 ;; Confirm before exitting Wanderlust.
86 (setq wl-interactive-exit t)
87
88 ;; Confirm before sending message.
89 (setq wl-interactive-send t)
90
91 ;; Create opened thread.
92 ;(setq wl-thread-insert-opened t)
93
94 ;; Keep folder window beside summary. (3 pane)
95 ;(setq wl-stay-folder-window t)
96
97 ;; Truncate long lines.
98 ;(setq wl-message-truncate-lines t)
99 ;(setq wl-draft-truncate-lines t)
100 ;; Following line is needed for XEmacs older than 21.4.6.
101 ;(setq truncate-partial-width-windows nil)
102
103 ;; Open new frame for draft buffer.
104 ;(setq wl-draft-use-frame t)
105
106 ;; Don't limit indent for thread view
107 ;(setq wl-summary-indent-length-limit nil)
108 ;(setq wl-summary-width nil)
109
110 ;; Divide thread by change of subject.
111 ;(setq wl-summary-divide-thread-when-subject-changed t)
112
113 ;; Change format of thread view
114 ;(setq wl-thread-indent-level 2)
115 ;(setq wl-thread-have-younger-brother-str "+"
116 ;      wl-thread-youngest-child-str      "+"
117 ;      wl-thread-vertical-str            "|"
118 ;      wl-thread-horizontal-str          "-"
119 ;      wl-thread-space-str               " ")
120
121 ;; display first message automatically.
122 ;(setq wl-auto-select-first t)
123
124 ;; goto next folder when exit from summary.
125 ;(setq wl-auto-select-next t)
126
127 ;; skip folder if there is no unread message.
128 ;(setq wl-auto-select-next 'skip-no-unread)
129
130 ;; jump to unread message in 'N' or 'P'.
131 ;(setq wl-summary-move-order 'unread)
132
133 ;; notify mail arrival
134 ;(setq wl-biff-check-folder-list '("%inbox"))
135 ;(setq wl-biff-notify-hook '(ding))
136
137
138 ;;; [[ Network ]]
139
140 ;; cache setting.
141 ;; (messages in localdir, localnews, maildir are not cached.)
142 ;(setq elmo-archive-use-cache nil)
143 ;(setq elmo-nntp-use-cache t)
144 ;(setq elmo-imap4-use-cache t)
145 ;(setq elmo-pop3-use-cache t)
146
147 ;; Enable disconnected operation in IMAP folder.
148 (setq elmo-enable-disconnected-operation t)
149
150 ;; Store draft message in queue folder if message is sent in unplugged status.
151 (setq wl-draft-enable-queuing t)
152 ;; when plug status is changed from unplugged to plugged,
153 ;; queued message is flushed automatically.
154 (setq wl-auto-flush-queue t)
155
156 ;; offline at startup.
157 ;(setq wl-plugged nil)
158 ;; change plug status by server or port at startup.
159 ;(add-hook 'wl-make-plugged-hook
160 ;         '(lambda ()
161 ;            ;; Add or Change plug status for SERVER and PORT.
162 ;            (elmo-set-plugged plugged(t/nil) server port)
163 ;            ;; When omit port, SEVERS all port was changes.
164 ;            ;; (Can't add plug status without PORT)
165 ;            (elmo-set-plugged plugged(t/nil) server)
166 ;            ))
167
168
169 ;;; [[ Special Setting ]]
170
171 ;; open unread group folder after checking.
172 ;(add-hook 'wl-folder-check-entity-hook
173 ;         '(lambda ()
174 ;            (wl-folder-open-unread-folder entity)
175 ;            ))
176
177 ;; Change summary display function.
178
179 ;; Set extra field use with `elmo-msgdb-overview-entity-get-extra-field'.
180 ;; And use with auto-refile.
181 (setq elmo-msgdb-extra-fields
182       '("newsgroups"
183         "list-id" "x-ml-name" "mailing-list"
184         "x-mail-count" "x-ml-count" "x-sequence"))
185
186 ;; ML message displays ML name and ML sequence number in subject.
187 (setq wl-summary-line-format "%n%T%P%M/%D(%W)%h:%m %t%[%17(%c %f%) %] %#%~%s")
188 ;; Set summary line format according to folder name.
189 ;(setq wl-folder-summary-line-format-alist
190 ;      '(("^%inbox\\.emacs\\.wl$" .
191 ;        "%-5l%T%P%M/%D %h:%m %-4S %[ %17f %] %t%C%s")
192 ;       ("^%" . "%T%P%M/%D %h:%m %-4S %[ %17f %] %t%C%s")
193 ;       ("^+" . "%n%T%P%M/%D %h:%m %-4S %[ %17f %] %t%C%s")))
194
195 ;; imput asynchronously.
196 ;; (utils/im-wl.el is needed to be installed.
197 ;;  Don't forget setting ~/.im/Config (Smtpservers).
198 ;;  note that wl-draft-enable-queuing is not valid.)
199 ;(autoload 'wl-draft-send-with-imput-async "im-wl")
200 ;(setq wl-draft-send-function 'wl-draft-send-with-imput-async)
201
202
203 ;; non-verbose User-Agent: field
204 ;(setq wl-generate-mailer-string-function
205 ;      'wl-generate-user-agent-string-1)
206
207
208 ;; Automatically save modified draft buffers in every 20 seconds.
209 ;(defun my-wl-auto-save-draft-buffers ()
210 ;  (let ((buffers (wl-collect-draft)))
211 ;    (save-excursion
212 ;      (while buffers
213 ;       (set-buffer (car buffers))
214 ;       (if (buffer-modified-p) (wl-draft-save))
215 ;       (setq buffers (cdr buffers))))))
216 ;(run-with-idle-timer 20 t 'my-wl-auto-save-draft-buffers)
217
218 ;; When you encrypt message by PGP, include your public key.
219 ;; (to make the message visible from yourself)
220 ;(setq pgg-encrypt-for-me t)
221
222
223 ;;; [[ Template ]]
224
225 ;; template
226 ;(setq wl-template-alist
227 ;      '(("default"
228 ;        ("From" . wl-from)
229 ;        ("Organization" . "organization for default")
230 ;        (body . "Hello, this is XXX \n")) ; body
231 ;       ("report"
232 ;        ("To" . "boss@example.com")
233 ;        ("Subject" . "Report")
234 ;        (top . "Sir, here is my report\n") ; insert in top.
235 ;        (bottom-file . "~/work/report.txt") ; insert file in bottom
236 ;        )
237 ;       ))
238
239 ;; Change headers in draft sending time.
240 ;(setq wl-draft-config-alist
241 ;      '((reply                         ; see reply buffer
242 ;        "^To: .*test-notsend-wl@lists\\.airs\\.net"
243 ;        (template . "default"))        ; template
244 ;       ("^To: .*test-notsend-wl@lists\\.airs\\.net"
245 ;        ding                           ; function
246 ;        ("From" . wl-from)             ; variable
247 ;        ("Organization" . "organization")) ; string
248 ;       ("^Newsgroups: test.*"
249 ;        ("Organization" . "organization for nntp."))
250 ;       ))
251
252 ;; Change headers in draft preparation time.
253 ;(add-hook 'wl-mail-setup-hook
254 ;         '(lambda ()
255 ;            (unless wl-draft-reedit;   ; don't apply when reedit.
256 ;              (wl-draft-config-exec wl-draft-config-alist))))
257
258
259 ;; [[ Reply ]]
260 ;; header value setting for mail reply.
261
262 ;; Wide window for draft buffer.
263 ;(setq wl-draft-reply-buffer-style 'full)
264
265 ;; Remove fullname in reply message header.
266 ;(setq wl-draft-reply-use-address-with-full-name nil)
267
268 ;; "a" (without-argument) reply to author (Reply-To or From).
269 ;; if 'X-ML-Name' and 'Reply-To' exists, reply to 'Reply-To'.
270 ;(setq wl-draft-reply-without-argument-list
271 ;      '((("X-ML-Name" "Reply-To") . (("Reply-To") nil nil))
272 ;       ("X-ML-Name" . (("To" "Cc") nil nil))
273 ;       ("Followup-To" . (nil nil ("Followup-To")))
274 ;       ("Newsgroups" . (nil nil ("Newsgroups")))
275 ;       ("Reply-To" . (("Reply-To") nil nil))
276 ;       ("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
277 ;       (wl-draft-self-reply-p . (("To") ("Cc") nil))
278 ;       ("From" . (("From") nil nil))))
279
280 ;; old defaults < 2.11.0
281 ;(setq wl-draft-reply-without-argument-list
282 ;      '(((wl-draft-self-reply-p
283 ;         "Followup-To") . (("To") ("Cc") ("Followup-To")))
284 ;       ((wl-draft-self-reply-p
285 ;         "Newsgroups") . (("To") ("Cc") ("Newsgroups")))
286 ;       ((wl-draft-self-reply-p
287 ;         "From") . (("To") ("Cc") nil))
288 ;       ("Followup-To" . (nil nil ("Followup-To")))
289 ;       ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
290 ;       ("Reply-To" . (("Reply-To") ("To" "Cc" "From") ("Newsgroups")))
291 ;       ("From" . (("From") ("To" "Cc") ("Newsgroups")))))
292 ;(setq wl-draft-reply-with-argument-list
293 ;      '(((wl-draft-self-reply-p
294 ;         "Followup-To") . (("To") ("Cc") ("Followup-To")))
295 ;       ((wl-draft-self-reply-p
296 ;         "Newsgroups") . (("To") ("Cc") ("Newsgroups")))
297 ;       ((wl-draft-self-reply-p
298 ;         "From") . (("To") ("Cc") nil))
299 ;       ("Reply-To" . (("Reply-To") nil nil))
300 ;       ("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
301 ;       ("From" . (("From") nil nil))))
302
303
304 ;;; [[ Message Display Settings ]]
305
306 ;; Hidden header field in message buffer.
307 (setq wl-message-ignored-field-list
308       '(".*Received:" ".*Path:" ".*Id:" "^References:"
309         "^Replied:" "^Errors-To:"
310         "^Lines:" "^Sender:" ".*Host:" "^Xref:"
311         "^Content-Type:" "^Precedence:"
312         "^Status:" "^X-VM-.*:"))
313
314 ;; Displayed header field in message buffer.
315 ;; This value precedes `wl-message-ignored-field-list'
316 (setq wl-message-visible-field-list '("^Message-Id:"))
317
318 ;; X-Face
319 (when window-system
320   (cond ((and (featurep 'xemacs)        ; for XEmacs
321               (module-installed-p 'x-face))
322          (autoload 'x-face-xmas-wl-display-x-face "x-face")
323          (setq wl-highlight-x-face-function 'x-face-xmas-wl-display-x-face))
324
325         ;; for Emacs21
326         ((and (not (featurep 'xemacs))
327               (= emacs-major-version 21)
328               (module-installed-p 'x-face-e21))
329          (autoload 'x-face-decode-message-header "x-face-e21")
330          (setq wl-highlight-x-face-function 'x-face-decode-message-header))
331
332         ;; for Emacs 19.34, Emacs 20.x
333         ((module-installed-p 'x-face-mule)
334          ;; x-face-mule distributed with bitmap-mule 8.0 or later
335          (autoload 'x-face-decode-message-header "x-face-mule")
336          (setq wl-highlight-x-face-function 'x-face-decode-message-header))
337         ))
338
339 ;; Scoring.
340 ;; "all.SCORE" file is used regardless of wl-score-folder-alist.
341 ;(setq wl-score-folder-alist
342 ;      '(("^-comp\\."
343 ;        "news.comp.SCORE"
344 ;        "news.SCORE")
345 ;       ("^-"
346 ;        "news.SCORE")))
347
348 ;; rule for auto refile.
349 ;(setq wl-refile-rule-alist
350 ;      '(
351 ;       ("x-ml-name"
352 ;        ("^Wanderlust" . "+wl")
353 ;        ("^Elisp" . "+elisp"))
354 ;       ("From"
355 ;        ("foo@example\\.com" . "+foo"))))
356
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)
360
361 ;;; [[ Spam Filter Settings ]]
362
363 ;; Use bogofilter as a back end.
364 ;(setq elmo-spam-scheme 'bogofilter)
365
366 ;(require 'wl-spam)
367
368 ;; Judge *first* whether a message is a spam
369 ;; when `o' (wl-summary-refile) is performed in a summary buffer.
370 ;(unless (memq 'wl-refile-guess-by-spam wl-refile-guess-functions)
371 ;  (setq wl-refile-guess-functions
372 ;       (cons #'wl-refile-guess-by-spam 
373 ;             wl-refile-guess-functions)))
374
375 ;; Judge *first* whether a message is a spam
376 ;; when `C-o' (wl-summary-auto-refile) is performed in a summary buffer.
377 ;(unless (memq 'wl-refile-guess-by-spam wl-auto-refile-guess-functions)
378 ;  (setq wl-auto-refile-guess-functions
379 ;       (cons #'wl-refile-guess-by-spam 
380 ;             wl-auto-refile-guess-functions)))
381
382 ;; When you want to give priority to refile-rule (same as spamfilter-wl.el
383 ;; or bogofilter-wl.el), please confirm the setup here.
384 ;(unless (memq 'wl-refile-guess-by-spam wl-auto-refile-guess-functions)
385 ;  (setq wl-auto-refile-guess-functions
386 ;       (append wl-auto-refile-guess-functions
387 ;               '(wl-refile-guess-by-spam))))
388
389 ;; In moving to each summary, judge whether a message is a spam
390 ;; according to a setup of wl-spam-auto-check-policy-alist.
391 ;(add-hook 'wl-summary-prepared-pre-hook #'wl-summary-auto-check-spam)
392
393 ;; Attach a refile mark to the message judged to be spam after going into +inbox.
394 ;(setq wl-spam-auto-check-policy-alist '(("\\+inbox" . refile)))
395
396 ;; Make the spam processor learn at the time of execution of refile.
397 ;; Even if the following setup was carried out, it does not always learn.
398 ;; See the docstring of wl-spam-undecided-folder-regexp-list and 
399 ;; wl-spam-ignored-folder-regexp-list in wl-spam.el for details.
400 ;(let ((actions wl-summary-mark-action-list)
401 ;      action)
402 ;  (while actions
403 ;    (setq action  (car actions)
404 ;         actions (cdr actions))
405 ;    (when (eq (wl-summary-action-symbol action) 'refile)
406 ;      (setf (nth 4 action) 'wl-summary-exec-action-refile-with-register)
407 ;      (setq actions nil))))
408
409 ;;; dot.wl ends here