8603cb05ad5f4e45f8ced8202117b78ccba1c17a
[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 ;; for .emacs begin
7 (autoload 'wl "wl" "Wanderlust" t)
8 (autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)
9 ;; for .emacs end
10
11 ;; Icon directory (XEmacs and Emacs21 only)
12 ;; (No need if installed as XEmacs package.)
13 ;(setq wl-icon-dir "/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
59 ;;; [[ Server Setting ]]
60
61 ;; Default IMAP4 server
62 (setq elmo-imap4-default-server "localhost")
63 ;; Default POP server
64 (setq elmo-pop3-default-server "localhost")
65 ;; SMTP server
66 (setq wl-smtp-posting-server "localhost")
67 ;; Default NNTP server
68 (setq elmo-nntp-default-server "localhost")
69 ;; NNTP server name for posting
70 (setq wl-nntp-posting-server elmo-nntp-default-server)
71
72 ;; IMAP authenticate type setting
73 (setq elmo-imap4-default-authenticate-type 'clear) ; raw
74 ;(setq elmo-imap4-default-authenticate-type 'cram-md5) ; CRAM-MD5
75
76 ;; POP-before-SMTP
77 ;(setq wl-draft-send-mail-function 'wl-draft-send-mail-with-pop-before-smtp)
78
79
80 ;;; [[ Basic Setting ]]
81
82 ;; Default folder for `wl-summary-goto-folder'.
83 ;(setq wl-default-folder "+inbox")
84
85 ;; Default string for folder name completion.
86 ;(setq wl-default-spec "+")
87
88 ;; Folder Carbon Copy
89 ;(setq wl-fcc "+outbox")
90
91 ;; Confirm before exitting Wanderlust.
92 (setq wl-interactive-exit t)
93
94 ;; Confirm before sending message.
95 (setq wl-interactive-send t)
96
97 ;; Create opened thread.
98 ;(setq wl-thread-insert-opened t)
99
100 ;; Keep folder window beside summary. (3 pane)
101 ;(setq wl-stay-folder-window t)
102
103 ;; Truncate long lines.
104 ;(setq wl-message-truncate-lines t)
105 ;(setq wl-draft-truncate-lines t)
106 ;; Following line is needed for XEmacs.
107 ;(setq truncate-partial-width-windows nil)
108
109 ;; Open new frame for draft buffer.
110 ;(setq wl-draft-use-frame t)
111
112 ;; Divide thread by change of subject.
113 ;(setq wl-summary-divide-thread-when-subject-changed t)
114
115 ;; Thread view
116 ;(setq wl-thread-indent-level 2)
117 ;(setq wl-thread-have-younger-brother-str "+"
118 ;      wl-thread-youngest-child-str      "+"
119 ;      wl-thread-vertical-str            "|"
120 ;      wl-thread-horizontal-str          "-"
121 ;      wl-thread-space-str               " ")
122
123 ;; display first message automatically.
124 ;(setq wl-auto-select-first t)
125
126 ;; goto next folder when exit from summary.
127 ;(setq wl-auto-select-next t)
128
129 ;; skip folder if there is no unread message.
130 ;(setq wl-auto-select-next 'skip-no-unread)
131
132 ;; jump to unread message in 'N' or 'P'.
133 ;(setq wl-summary-move-order 'unread)
134
135 ;; notify mail arrival
136 ;(setq wl-biff-check-folder-list '("%inbox"))
137 ;(setq wl-biff-notify-hook '(ding))
138
139
140 ;;; [[ Network ]]
141
142 ;; cache setting.
143 ;; (messages in localdir, localnews, maildir are not cached.)
144 ;(setq elmo-archive-use-cache nil)
145 ;(setq elmo-nntp-use-cache t)
146 ;(setq elmo-imap4-use-cache t)
147 ;(setq elmo-pop3-use-cache t)
148
149 ;; Enable disconnected operation in IMAP folder.
150 ;(setq elmo-enable-disconnected-operation t)
151
152 ;; Store draft message in queue folder if message is sent in unplugged status.
153 (setq wl-draft-enable-queuing t)
154 ;; when plug status is changed from unplugged to plugged,
155 ;; queued message is flushed automatically.
156 (setq wl-auto-flush-queue t)
157
158 ;; offline at startup.
159 ;(setq wl-plugged nil)
160 ;; change plug status by server or port at startup.
161 ;(add-hook 'wl-make-plugged-hook
162 ;         '(lambda ()
163 ;            ;; Add or Change plug status for SERVER and PORT.
164 ;            (elmo-set-plugged plugged(t/nil) server port)
165 ;            ;; When omit port, SEVERS all port was changes.
166 ;            ;; (Can't add plug status without PORT)
167 ;            (elmo-set-plugged plugged(t/nil) server)
168 ;            ))
169
170
171 ;;; [[ Special Setting ]]
172
173 ;; open unread group folder after checking.
174 ;(add-hook 'wl-folder-check-entity-hook
175 ;         '(lambda ()
176 ;            (wl-folder-open-unread-folder entity)
177 ;            ))
178
179 ;; Change summary display function.
180
181 ;; get extra field values as overview information (only localdir folder).
182 (setq elmo-msgdb-extra-fields
183       '("newsgroups"
184         "list-id" "x-ml-name" "mailing-list"
185         "x-mail-count" "x-ml-count" "x-sequence"))
186
187 ;; ML message displays ML name and ML sequence number in subject.
188 (setq wl-summary-subject-function 'my-wl-summary-subject-func-ml)
189 (defun my-wl-summary-subject-func-ml (subject-string)
190   (let ((folder wl-summary-buffer-folder-name)
191         (subj subject-string) (sequence) (ml-name) (ml-count))
192     (setq sequence (elmo-msgdb-overview-entity-get-extra-field
193                     entity "x-sequence")
194           ml-name (or (elmo-msgdb-overview-entity-get-extra-field
195                        entity "x-ml-name")
196                       (and sequence
197                            (car (split-string sequence " "))))
198           ml-count (or (elmo-msgdb-overview-entity-get-extra-field
199                         entity "x-mail-count")
200                        (elmo-msgdb-overview-entity-get-extra-field
201                         entity "x-ml-count")
202                        (and sequence
203                             (cadr (split-string sequence " ")))))
204     (if (string-match
205          "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*"
206          subject-string)
207         (progn
208           (setq subj (substring subject-string (match-end 0)))
209           (if (not ml-name) (setq ml-name (match-string 1 subject-string)))
210           (if (not ml-count) (setq ml-count (match-string 2 subject-string)))))
211     (if (and ml-name ml-count)
212         (if (string= folder wl-default-folder)
213             (format "(%s %05d) %s"
214                     (car (split-string ml-name " "))
215                     (string-to-int ml-count)
216                     subj)
217           (format "#%05d %s"
218                   (string-to-int ml-count) subj))
219       subj)))
220
221 ;; imput asynchronously.
222 ;; (utils/im-wl.el is needed to be installed.
223 ;;  Don't forget setting ~/.im/Config (Smtpservers).
224 ;;  note that wl-draft-enable-queuing is not valid.)
225 ;(autoload 'wl-draft-send-with-imput-async "im-wl")
226 ;(setq wl-draft-send-function 'wl-draft-send-with-imput-async)
227
228
229 ;; non-verbose User-Agent: field
230 ;(setq wl-generate-mailer-string-function
231 ;      (function
232 ;       (lambda ()
233 ;        (concat "User-Agent: "
234 ;                (wl-generate-user-agent-string-1 nil)))))
235
236
237 ;;; [[ Template ]]
238
239 ;; template
240 (setq wl-template-alist
241       '(("default"
242          ("From" . wl-from)
243          ("Organization" . "~/.wl sample")
244          (body . "Hello, this is XXX \n"))              ;; body
245         ("report"
246          ("To" . "boss@example.com")
247          ("Subject" . "Report")
248          (top . "Sir, here is my report\n")             ;; insert in top.
249 ;;       (bottom-file . "~/work/report.txt")    ;; insert file in bottom
250          )
251         ))
252 ;; Change headers in draft sending time.
253 (setq wl-draft-config-alist
254       '((reply          ;; see reply buffer
255          "^To: .*\\(test-notsend-wl@lists.airs.net\\)"
256          (template . "default"))                ;; template
257         ("^To: .*\\(test-notsend-wl@lists.airs.net\\)"
258          wl-ml-draft-config-function            ;; function
259          ("From" . wl-from)                     ;; variable
260          ("Organization" . "~/.wl sample"))     ;; string
261         ("^Newsgroups: test.*"
262          ("Organization" . "organization for nntp."))
263         ))
264
265 ;; Change headers in draft preparation time.
266 ;(add-hook 'wl-mail-setup-hook
267 ;         '(lambda ()
268 ;            (unless wl-draft-reedit;   ; don't apply when reedit.
269 ;              (wl-draft-config-exec wl-draft-config-alist))))
270
271
272 ;; [[ Reply ]]
273 ;; header value setting for mail reply.
274
275 ;; Wide window for draft buffer.
276 ;(setq wl-draft-reply-buffer-style 'full)
277
278 ;; Remove fullname in reply message header.
279 ;(setq wl-draft-reply-use-address-with-full-name nil)
280
281 ;; "a" (without-argument) reply to author (Reply-To or From).
282 ;; if 'X-ML-Name' and 'Reply-To' exists, reply to 'Reply-To'.
283 (setq wl-draft-reply-without-argument-list
284       '((("X-ML-Name" "Reply-To") . (("Reply-To") nil nil))
285         ("X-ML-Name" . (("To" "Cc") nil nil))
286         ("Followup-To" . (nil nil ("Followup-To")))
287         ("Newsgroups" . (nil nil ("Newsgroups")))
288         ("Reply-To" . (("Reply-To") nil nil))
289         ("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
290         ("From" . (("From") nil nil))))
291
292 ;; "C-u a" (with-argument) reply to all.
293 (setq wl-draft-reply-with-argument-list
294       '(("Followup-To" . (("From") nil ("Followup-To")))
295         ("Newsgroups" . (("From") nil ("Newsgroups")))
296         ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
297         ("From" . (("From") ("To" "Cc") ("Newsgroups")))))
298
299
300 ;;; [[ Message Display Settings ]]
301
302 ;; Hidden header field in message buffer.
303 (setq wl-message-ignored-field-list
304       '(".*Received:" ".*Path:" ".*Id:" "^References:"
305         "^Replied:" "^Errors-To:"
306         "^Lines:" "^Sender:" ".*Host:" "^Xref:"
307         "^Content-Type:" "^Precedence:"
308         "^Status:" "^X-VM-.*:"))
309
310 ;; Displayed header field in message buffer.
311 ;; This value precedes `wl-message-ignored-field-list'
312 (setq wl-message-visible-field-list '("^Message-Id:"))
313
314 ;; X-Face (requires x-face or bitmap-mule)
315 (when window-system
316   (cond ((and (featurep 'xemacs)                ; for XEmacs
317               (module-installed-p 'x-face))
318          (autoload 'x-face-xmas-wl-display-x-face "x-face")
319          (setq wl-highlight-x-face-function 'x-face-xmas-wl-display-x-face))
320         ;; for Mule (GNU Emacs)
321         ((module-installed-p 'x-face-mule)
322          ;; for x-face-mule distributed with bitmap-mule 8.0 or later
323          (autoload 'x-face-decode-message-header "x-face-mule")
324          (setq wl-highlight-x-face-function 'x-face-decode-message-header))
325         ))
326
327 ;; Scoring.
328 ;; "all.SCORE" file is used regardless of wl-score-folder-alist.
329 ;(setq wl-score-folder-alist
330 ;      '(("^-comp\\."
331 ;        "news.comp.SCORE"
332 ;        "news.SCORE")
333 ;       ("^-"
334 ;        "news.SCORE")))
335
336 ;; rule for auto refile.
337 ;(setq wl-refile-rule-alist
338 ;      '(
339 ;       ("x-ml-name"
340 ;        ("^Wanderlust" . "+wl")
341 ;        ("^Elisp" . "+elisp"))
342 ;       ("From"
343 ;        ("teranisi@isl.ntt.co.jp" . "+teranisi"))))
344
345 ;; Marks to skip auto-refile (default is "N" "U" "!").
346 ;; nil means all message is auto-refiled.
347 ;(setq wl-summary-auto-refile-skip-marks nil)
348
349 ;;; dot.wl ends here