417741cfbd913edf38be3e3db851391dd37148a3
[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 ;; User's mail addresses.
35 (setq wl-user-mail-address-list
36       (list (wl-address-header-extract-address wl-from)
37             ;; "e-mail2@example.com"
38             ;; "e-mail3@example.net" ...
39             ))
40
41 ;; Subscribed mailing list.
42 (setq wl-subscribed-mailing-list
43       '("wl@lists.airs.net"
44         "apel-ja@m17n.org"
45         "emacs-mime-ja@m17n.org"
46         ;; "ml@example.com" ...
47         ))
48
49 ;; If (system-name) does not return FQDN,
50 ;; set following as a local domain name without hostname.
51 ;; ((system-name) "." wl-local-domain is used as domain part of Message-ID
52 ;; and an argument of HELO in SMTP.
53 ;(setq wl-local-domain "example.com")
54
55 ;; Specific domain part for message-id.
56 ;(setq wl-message-id-domain "hostname.example.com")
57
58 ;; Use wl-from for generating message-id.
59 ;; wl-message-id-use-wl-from precedes wl-local-domain and wl-message-id-domain.
60 ;(setq wl-message-id-use-wl-from t)
61
62 ;;; [[ Server Setting ]]
63
64 ;; Default IMAP4 server
65 (setq elmo-imap4-default-server "localhost")
66 ;; Default POP server
67 (setq elmo-pop3-default-server "localhost")
68 ;; SMTP server
69 (setq wl-smtp-posting-server "localhost")
70 ;; Default NNTP server
71 (setq elmo-nntp-default-server "localhost")
72 ;; NNTP server name for posting
73 (setq wl-nntp-posting-server elmo-nntp-default-server)
74
75 ;; IMAP authenticate type setting
76 (setq elmo-imap4-default-authenticate-type 'clear) ; raw
77 ;(setq elmo-imap4-default-authenticate-type 'cram-md5) ; CRAM-MD5
78
79 ;; POP-before-SMTP
80 ;(setq wl-draft-send-mail-function 'wl-draft-send-mail-with-pop-before-smtp)
81
82
83 ;;; [[ Basic Setting ]]
84
85 ;; Default folder for `wl-summary-goto-folder'.
86 ;(setq wl-default-folder "+inbox")
87
88 ;; Default string for folder name completion.
89 ;(setq wl-default-spec "+")
90
91 ;; Folder Carbon Copy
92 ;(setq wl-fcc "+outbox")
93
94 ;; Confirm before exitting Wanderlust.
95 (setq wl-interactive-exit t)
96
97 ;; Confirm before sending message.
98 (setq wl-interactive-send t)
99
100 ;; Create opened thread.
101 ;(setq wl-thread-insert-opened t)
102
103 ;; Keep folder window beside summary. (3 pane)
104 ;(setq wl-stay-folder-window t)
105
106 ;; Truncate long lines.
107 ;(setq wl-message-truncate-lines t)
108 ;(setq wl-draft-truncate-lines t)
109 ;; Following line is needed for XEmacs older than 21.4.6.
110 ;(setq truncate-partial-width-windows nil)
111
112 ;; Open new frame for draft buffer.
113 ;(setq wl-draft-use-frame t)
114
115 ;; Don't limit indent for thread view
116 ;(setq wl-summary-indent-length-limit nil)
117 ;(setq wl-summary-width nil)
118
119 ;; Divide thread by change of subject.
120 ;(setq wl-summary-divide-thread-when-subject-changed t)
121
122 ;; Change format of thread view
123 ;(setq wl-thread-indent-level 2)
124 ;(setq wl-thread-have-younger-brother-str "+"
125 ;      wl-thread-youngest-child-str      "+"
126 ;      wl-thread-vertical-str            "|"
127 ;      wl-thread-horizontal-str          "-"
128 ;      wl-thread-space-str               " ")
129
130 ;; display first message automatically.
131 ;(setq wl-auto-select-first t)
132
133 ;; goto next folder when exit from summary.
134 ;(setq wl-auto-select-next t)
135
136 ;; skip folder if there is no unread message.
137 ;(setq wl-auto-select-next 'skip-no-unread)
138
139 ;; jump to unread message in 'N' or 'P'.
140 ;(setq wl-summary-move-order 'unread)
141
142 ;; notify mail arrival
143 ;(setq wl-biff-check-folder-list '("%inbox"))
144 ;(setq wl-biff-notify-hook '(ding))
145
146
147 ;;; [[ Network ]]
148
149 ;; cache setting.
150 ;; (messages in localdir, localnews, maildir are not cached.)
151 ;(setq elmo-archive-use-cache nil)
152 ;(setq elmo-nntp-use-cache t)
153 ;(setq elmo-imap4-use-cache t)
154 ;(setq elmo-pop3-use-cache t)
155
156 ;; Enable disconnected operation in IMAP folder.
157 (setq elmo-enable-disconnected-operation t)
158
159 ;; Store draft message in queue folder if message is sent in unplugged status.
160 (setq wl-draft-enable-queuing t)
161 ;; when plug status is changed from unplugged to plugged,
162 ;; queued message is flushed automatically.
163 (setq wl-auto-flush-queue t)
164
165 ;; offline at startup.
166 ;(setq wl-plugged nil)
167 ;; change plug status by server or port at startup.
168 ;(add-hook 'wl-make-plugged-hook
169 ;         '(lambda ()
170 ;            ;; Add or Change plug status for SERVER and PORT.
171 ;            (elmo-set-plugged plugged(t/nil) server port)
172 ;            ;; When omit port, SEVERS all port was changes.
173 ;            ;; (Can't add plug status without PORT)
174 ;            (elmo-set-plugged plugged(t/nil) server)
175 ;            ))
176
177
178 ;;; [[ Special Setting ]]
179
180 ;; bind "b" in Summary to resend-message (ala mutt's "b"ounce)
181 ;(add-hook 'wl-summary-mode-hook
182 ;         '(lambda ()
183 ;            (define-key wl-summary-mode-map "b" 'wl-summary-resend-message)
184 ;            ))
185
186 ;; open unread group folder after checking.
187 ;(add-hook 'wl-folder-check-entity-hook
188 ;         '(lambda ()
189 ;            (wl-folder-open-unread-folder entity)
190 ;            ))
191
192 ;; Change summary display function.
193
194 ;; Set extra field use with `elmo-msgdb-overview-entity-get-extra-field'.
195 ;; And use with auto-refile.
196 (setq elmo-msgdb-extra-fields
197       '("newsgroups"
198         "list-id" "x-ml-name" "mailing-list"
199         "x-mail-count" "x-ml-count" "x-sequence"))
200
201 ;; ML message displays ML name and ML sequence number in subject.
202 (setq wl-summary-line-format "%n%T%P%M/%D(%W)%h:%m %t%[%17(%c %f%) %] %#%~%s")
203 ;; Set summary line format according to folder name.
204 ;(setq wl-folder-summary-line-format-alist
205 ;      '(("^%inbox\\.emacs\\.wl$" .
206 ;        "%-5l%T%P%M/%D %h:%m %-4S %[ %17f %] %t%C%s")
207 ;       ("^%" . "%T%P%M/%D %h:%m %-4S %[ %17f %] %t%C%s")
208 ;       ("^+" . "%n%T%P%M/%D %h:%m %-4S %[ %17f %] %t%C%s")))
209
210 ;; imput asynchronously.
211 ;; (utils/im-wl.el is needed to be installed.
212 ;;  Don't forget setting ~/.im/Config (Smtpservers).
213 ;;  note that wl-draft-enable-queuing is not valid.)
214 ;(autoload 'wl-draft-send-with-imput-async "im-wl")
215 ;(setq wl-draft-send-function 'wl-draft-send-with-imput-async)
216
217
218 ;; non-verbose User-Agent: field
219 ;(setq wl-generate-mailer-string-function
220 ;      'wl-generate-user-agent-string-1)
221
222
223 ;; Automatically save modified draft buffers in every 20 seconds.
224 ;(defun my-wl-auto-save-draft-buffers ()
225 ;  (let ((buffers (wl-collect-draft)))
226 ;    (save-excursion
227 ;      (while buffers
228 ;       (set-buffer (car buffers))
229 ;       (if (buffer-modified-p) (wl-draft-save))
230 ;       (setq buffers (cdr buffers))))))
231 ;(run-with-idle-timer 20 t 'my-wl-auto-save-draft-buffers)
232
233
234 ;;; [[ Template ]]
235
236 ;; template
237 ;(setq wl-template-alist
238 ;      '(("default"
239 ;        ("From" . wl-from)
240 ;        ("Organization" . "organization for default")
241 ;        (body . "Hello, this is XXX \n")) ; body
242 ;       ("report"
243 ;        ("To" . "boss@example.com")
244 ;        ("Subject" . "Report")
245 ;        (top . "Sir, here is my report\n") ; insert in top.
246 ;        (bottom-file . "~/work/report.txt") ; insert file in bottom
247 ;        )
248 ;       ))
249
250 ;; Change headers in draft sending time.
251 ;(setq wl-draft-config-alist
252 ;      '((reply                         ; see reply buffer
253 ;        "^To: .*test-notsend-wl@lists\\.airs\\.net"
254 ;        (template . "default"))        ; template
255 ;       ("^To: .*test-notsend-wl@lists\\.airs\\.net"
256 ;        ding                           ; function
257 ;        ("From" . wl-from)             ; variable
258 ;        ("Organization" . "organization")) ; string
259 ;       ("^Newsgroups: test.*"
260 ;        ("Organization" . "organization for nntp."))
261 ;       ))
262
263 ;; Change headers in draft preparation time.
264 ;(add-hook 'wl-mail-setup-hook
265 ;         '(lambda ()
266 ;            (unless wl-draft-reedit;   ; don't apply when reedit.
267 ;              (wl-draft-config-exec wl-draft-config-alist))))
268
269
270 ;; [[ Reply ]]
271 ;; header value setting for mail reply.
272
273 ;; Wide window for draft buffer.
274 ;(setq wl-draft-reply-buffer-style 'full)
275
276 ;; Remove fullname in reply message header.
277 ;(setq wl-draft-reply-use-address-with-full-name nil)
278
279 ;; "a" (without-argument) reply to author (Reply-To or From).
280 ;; if 'X-ML-Name' and 'Reply-To' exists, reply to 'Reply-To'.
281 ;(setq wl-draft-reply-without-argument-list
282 ;      '((("X-ML-Name" "Reply-To") . (("Reply-To") nil nil))
283 ;       ("X-ML-Name" . (("To" "Cc") nil nil))
284 ;       ("Followup-To" . (nil nil ("Followup-To")))
285 ;       ("Newsgroups" . (nil nil ("Newsgroups")))
286 ;       ("Reply-To" . (("Reply-To") nil nil))
287 ;       ("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
288 ;       (wl-draft-self-reply-p . (("To") ("Cc") nil))
289 ;       ("From" . (("From") nil nil))))
290
291 ;; old defaults < 2.11.0
292 ;(setq wl-draft-reply-without-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 ;       ("Followup-To" . (nil nil ("Followup-To")))
300 ;       ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
301 ;       ("Reply-To" . (("Reply-To") ("To" "Cc" "From") ("Newsgroups")))
302 ;       ("From" . (("From") ("To" "Cc") ("Newsgroups")))))
303 ;(setq wl-draft-reply-with-argument-list
304 ;      '(((wl-draft-self-reply-p
305 ;         "Followup-To") . (("To") ("Cc") ("Followup-To")))
306 ;       ((wl-draft-self-reply-p
307 ;         "Newsgroups") . (("To") ("Cc") ("Newsgroups")))
308 ;       ((wl-draft-self-reply-p
309 ;         "From") . (("To") ("Cc") nil))
310 ;       ("Reply-To" . (("Reply-To") nil nil))
311 ;       ("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
312 ;       ("From" . (("From") nil nil))))
313
314
315 ;;; [[ Message Display Settings ]]
316
317 ;; Hidden header field in message buffer.
318 (setq wl-message-ignored-field-list
319       '(".*Received:" ".*Path:" ".*Id:" "^References:"
320         "^Replied:" "^Errors-To:"
321         "^Lines:" "^Sender:" ".*Host:" "^Xref:"
322         "^Content-Type:" "^Precedence:"
323         "^Status:" "^X-VM-.*:"))
324
325 ;; Displayed header field in message buffer.
326 ;; This value precedes `wl-message-ignored-field-list'
327 (setq wl-message-visible-field-list '("^Message-Id:"))
328
329 ;; X-Face
330 (when window-system
331   (cond ((and (featurep 'xemacs)        ; for XEmacs
332               (module-installed-p 'x-face))
333          (autoload 'x-face-xmas-wl-display-x-face "x-face")
334          (setq wl-highlight-x-face-function 'x-face-xmas-wl-display-x-face))
335
336         ;; for Emacs21
337         ((and (not (featurep 'xemacs))
338               (= emacs-major-version 21)
339               (module-installed-p 'x-face-e21))
340          (autoload 'x-face-decode-message-header "x-face-e21")
341          (setq wl-highlight-x-face-function 'x-face-decode-message-header))
342
343         ;; for Emacs 19.34, Emacs 20.x
344         ((module-installed-p 'x-face-mule)
345          ;; x-face-mule distributed with bitmap-mule 8.0 or later
346          (autoload 'x-face-decode-message-header "x-face-mule")
347          (setq wl-highlight-x-face-function 'x-face-decode-message-header))
348         ))
349
350 ;; Scoring.
351 ;; "all.SCORE" file is used regardless of wl-score-folder-alist.
352 ;(setq wl-score-folder-alist
353 ;      '(("^-comp\\."
354 ;        "news.comp.SCORE"
355 ;        "news.SCORE")
356 ;       ("^-"
357 ;        "news.SCORE")))
358
359 ;; rule for auto refile.
360 ;(setq wl-refile-rule-alist
361 ;      '(
362 ;       ("x-ml-name"
363 ;        ("^Wanderlust" . "+wl")
364 ;        ("^Elisp" . "+elisp"))
365 ;       ("From"
366 ;        ("foo@example\\.com" . "+foo"))))
367
368 ;; Marks to skip auto-refile (default is "N" "U" "!").
369 ;; nil means all message is auto-refiled.
370 ;(setq wl-summary-auto-refile-skip-marks nil)
371
372 ;;; dot.wl ends here