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