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