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