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