Fixed typo.
[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 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 is larger than this value, message is `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         ;;"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 at exit time.
92 (setq wl-interactive-exit t)
93
94 ;; Confirm at message sending time.
95 (setq wl-interactive-send t)
96
97 ;; Create opened thread.
98 ;(setq wl-thread-insert-opened t)
99
100 ;; folder mode and summary mode is displayed at the same time. (3pane)
101 ;(setq wl-stay-folder-window t)
102
103 ;; Open new frame for draft buffer.
104 ;(setq wl-draft-use-frame t)
105
106 ;; Thread divide when change subject.
107 ;(setq wl-summary-divide-thread-when-subject-changed t)
108
109 ;; Thread view
110 ;(setq wl-thread-have-younger-brother-str "+"
111 ;      wl-thread-youngest-child-str      "+"
112 ;      wl-thread-vertical-str            "|"
113 ;      wl-thread-horizontal-str          "-"
114 ;      wl-thread-space-str               " ")
115
116 ;; display first message automatically.
117 ;(setq wl-auto-select-first t)
118
119 ;; goto next folder when exit from summary.
120 ;(setq wl-auto-select-next t)
121
122 ;; folder is skipped if there is no unread.
123 ;(setq wl-summary-next-no-unread 'skip-no-unread)
124
125 ;; jump to unread message in 'N' or 'P'.
126 ;(setq wl-summary-move-order 'unread)
127
128
129 ;;; [[ Network ]]
130
131 ;; cache setting.
132 ;; (messages in localdir, localnews, maildir are not cached.)
133 ;(setq elmo-archive-use-cache nil)
134 ;(setq elmo-nntp-use-cache t)
135 ;(setq elmo-imap4-use-cache t)
136 ;(setq elmo-pop3-use-cache t)
137
138 ;; Enable disconnected operation in IMAP folder.
139 ;(setq elmo-enable-disconnected-operation t)
140
141 ;; Store draft message in queue folder if message is sent in unplugged status.
142 (setq wl-draft-enable-queuing t)
143 ;; when plug status is changed from unplugged to plugged,
144 ;; queued message is flushed automatically.
145 (setq wl-auto-flush-queue t)
146
147 ;; offline at startup.
148 ;(setq wl-plugged nil)
149 ;; change plug status by server or port at startup.
150 ;(add-hook 'wl-make-plugged-hook
151 ;         '(lambda ()
152 ;            (elmo-set-plugged plugged(t/nil) server port)
153 ;            (elmo-set-plugged plugged(t/nil) server)
154 ;            ))
155
156
157 ;;; [[ Special Setting ]]
158
159 ;; open unread group folder after checking.
160 ;(add-hook 'wl-folder-check-entity-hook
161 ;         '(lambda ()
162 ;            (wl-folder-open-unread-folder entity)
163 ;            ))
164
165 ;; Change summary display function.
166
167 ;; get extra field values as overview information (only localdir folder).
168 (setq elmo-msgdb-extra-fields
169       '("newsgroups"
170         "list-id" "x-ml-name" "mailing-list"
171         "x-mail-count" "x-ml-count" "x-sequence"))
172
173 ;; ML message displays ML name and ML sequence number in subject.
174 (setq wl-summary-subject-function 'my-wl-summary-subject-func-ml)
175 (defun my-wl-summary-subject-func-ml (subject-string)
176   (let ((folder wl-summary-buffer-folder-name)
177         (subj subject-string) (sequence) (ml-name) (ml-count))
178     (setq sequence (elmo-msgdb-overview-entity-get-extra-field
179                     entity "x-sequence")
180           ml-name (or (elmo-msgdb-overview-entity-get-extra-field
181                        entity "x-ml-name")
182                       (and sequence
183                            (car (split-string sequence " "))))
184           ml-count (or (elmo-msgdb-overview-entity-get-extra-field
185                         entity "x-mail-count")
186                        (elmo-msgdb-overview-entity-get-extra-field
187                         entity "x-ml-count")
188                        (and sequence
189                             (cadr (split-string sequence " ")))))
190     (if (string-match
191 ;;;      "^\\s(\\(.+\\)[ :]\\([0-9]+\\)\\s)[ \t]*"
192          "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*"
193          subject-string)
194         (progn
195           (setq subj (substring subject-string (match-end 0)))
196           (if (not ml-name) (setq ml-name (match-string 1 subject-string)))
197           (if (not ml-count) (setq ml-count (match-string 2 subject-string)))))
198     (if (and ml-name ml-count)
199         (if (string= folder wl-default-folder)
200             (format "(%s %05d) %s"
201                     (car (split-string ml-name " "))
202                     (string-to-int ml-count)
203                     subj)
204           (format "#%05d %s"
205                   (string-to-int ml-count) subj))
206       subj)))
207
208 ;; imput asynchronously.
209 ;; (utils/im-wl.el is needed to be installed.
210 ;;  Don't forget setting ~/.im/Config (Smtpservers).
211 ;;  note that wl-draft-enable-queuing is not valid.)
212 ;(autoload 'wl-draft-send-with-imput-async "im-wl")
213 ;(setq wl-draft-send-function 'wl-draft-send-with-imput-async)
214
215
216 ;; non-verbose User-Agent: field
217 ;(setq wl-generate-mailer-string-function
218 ;      (function
219 ;       (lambda ()
220 ;        (wl-generate-user-agent-string-1 nil))))
221
222
223 ;;; [[ Template ]]
224
225 ;; template
226 (setq wl-template-alist
227       '(("default"
228          ("From" . wl-from)
229          ("Organization" . "~/.wl sample")
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 ;; Change headers in draft sending time.
239 (setq wl-draft-config-alist
240       '((reply          ;; see reply buffer
241          "^To: .*\\(test-notsend-wl@lists.airs.net\\)"
242          (template . "default"))                ;; template
243         ("^To: .*\\(test-notsend-wl@lists.airs.net\\)"
244          wl-ml-draft-config-function            ;; function
245          ("From" . wl-from)                     ;; variable
246          ("Organization" . "~/.wl sample"))     ;; string
247         ("^Newsgroups: test.*"
248          ("Organization" . "organization for nntp."))
249         ))
250
251 ;; Change headers in draft preparation time.
252 ;(add-hook 'wl-mail-setup-hook
253 ;         '(lambda ()
254 ;            (unless wl-draft-reedit;   ; don't apply when reedit.
255 ;              (wl-draft-config-exec wl-draft-config-alist))))
256
257
258 ;; [[ Reply ]]
259 ;; header value setting for mail reply.
260
261 ;; Wide window for draft buffer.
262 ;(setq wl-draft-reply-buffer-style 'full)
263
264 ;; Remove fullname in reply message header.
265 ;(setq wl-draft-reply-use-address-with-full-name nil)
266
267 ;; "a" (without-argument) reply to author (Reply-To or From).
268 ;; if 'X-ML-Name' and 'Reply-To' exists, reply to 'Reply-To'.
269 (setq wl-draft-reply-without-argument-list
270       '((("X-ML-Name" "Reply-To") . (("Reply-To") nil nil))
271         ("X-ML-Name" . (("To" "Cc") nil nil))
272         ("Followup-To" . (nil nil ("Followup-To")))
273         ("Newsgroups" . (nil nil ("Newsgroups")))
274         ("Reply-To" . (("Reply-To") nil nil))
275         ("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
276         ("From" . (("From") nil nil))))
277
278 ;; "C-u a" (with-argument) reply to all.
279 (setq wl-draft-reply-with-argument-list
280       '(("Followup-To" . (("From") nil ("Followup-To")))
281         ("Newsgroups" . (("From") nil ("Newsgroups")))
282         ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
283         ("From" . (("From") ("To" "Cc") ("Newsgroups")))))
284
285
286 ;;; [[ Message Display Settings ]]
287
288 ;; Hidden header field in message buffer.
289 (setq wl-message-ignored-field-list
290       '(".*Received:" ".*Path:" ".*Id:" "^References:"
291         "^Replied:" "^Errors-To:"
292         "^Lines:" "^Sender:" ".*Host:" "^Xref:"
293         "^Content-Type:" "^Precedence:"
294         "^Status:" "^X-VM-.*:"))
295
296 ;; Displayed header field in message buffer.
297 ;; This value precedes `wl-message-ignored-field-list'
298 (setq wl-message-visible-field-list '("^Message-Id:"))
299
300 ;; X-Face (requires x-face (and x-face-mule))
301 (when (and window-system
302            (module-installed-p 'x-face))
303   (cond ((featurep 'xemacs)             ; for XEmacs
304          (autoload 'x-face-xmas-wl-display-x-face "x-face" nil t)
305          (setq wl-highlight-x-face-function 'x-face-xmas-wl-display-x-face))
306         ;; for Mule (GNU Emacs)
307         ((module-installed-p 'x-face-mule)
308          ;; x-face-mule 0.20 or later
309          (setq wl-highlight-x-face-function
310                (function
311                 (lambda (&rest dummy)
312                   (x-face-decode-message-header))))
313          (require 'x-face-mule))
314         ))
315
316 ;; Scoring.
317 ;; "all.SCORE" file is used regardless of wl-score-folder-alist.
318 ;(setq wl-score-folder-alist
319 ;      '(("^-comp\\."
320 ;        "news.comp.SCORE"
321 ;        "news.SCORE")
322 ;       ("^-"
323 ;        "news.SCORE")))
324
325 ;; directory for storing score files.
326 ; (setq wl-score-files-directory "~/.elmo/")
327
328 ;; rule for auto refile.
329 ;(setq wl-refile-rule-alist
330 ;      '(
331 ;       ("x-ml-name"
332 ;        ("^Wanderlust" . "+wl")
333 ;        ("^Elisp" . "+elisp"))
334 ;       ("From"
335 ;        ("teranisi@isl.ntt.co.jp" . "+teranisi"))))
336
337 ;; Marks to skip auto-refile (default is "N" "U" "!").
338 ;; nil means all message is auto-refiled.
339 ;(setq wl-summary-auto-refile-skip-marks nil)
340
341 ;;; dot.wl ends here