2
;From: Ian Jackson <iwj10@cus.cam.ac.uk>
3
;To: richard@elmail.co.uk (Richard Kettlewell)
5
;Date: Sat, 12 Aug 95 16:28 BST
7
;Richard Kettlewell writes ("~/.vm"):
8
;> Do you have a ~/.vm file you would like to contribute to the Debian vm
11
;I keep my vm startup stuff in ~/emacs/ian.el. It could probably do
12
;with a bit of tweaking, but here it is.
16
; In Emacs 19 only, to override the default mouse bindings (which
18
(add-hook 'vm-mode-hook 'unset-down-mouse-3)
19
(add-hook 'vm-mail-mode-hook 'unset-down-mouse-3)
21
; In my term-setup-hook function:
22
(global-set-key "m" 'vm-mail)
23
(global-set-key "4m" 'vm-mail-other-window)
24
(global-set-key "9" 'vm-visit-folder)
26
; To purge deleted messages automatically:
27
(add-hook 'vm-mode-hook
29
(local-set-key "Q" 'vm-quit)
30
(local-set-key "q" "#Q")))
32
; ^X 4 m does the right thing ...
33
(defun vm-mail-other-window ()
34
"Like `vm-mail' command, but display buffer in another window."
36
(switch-to-buffer-other-window (current-buffer))
39
; All my general variables
40
(setq vm-included-text-attribution-format "%F writes (\"%s\"):\n"
41
vm-reply-subject-prefix "Re: "
42
vm-folder-directory "~/mail/"
43
vm-delete-after-saving t
44
vm-delete-empty-folders t
45
vm-mutable-windows nil
47
vm-included-text-prefix "> "
49
vm-auto-center-summary t
50
vm-confirm-new-folders t
51
vm-circular-folders nil
52
vm-visit-when-saving t
53
vm-move-after-deleting t
54
vm-keep-sent-messages t
55
vm-follow-summary-cursor t
56
vm-frame-per-composition nil
58
vm-frame-per-summary nil
59
vm-frame-per-folder nil
60
vm-primary-inbox (concat vm-folder-directory "INBOX")
61
vm-uninteresting-senders "ian"
62
vm-spool-files '("~/mbox" "~/mail/Outbound" "~/mail/Record"
63
"~/mail/Import" "/usr/spool/mail/ian" "~/News/r")
64
vm-startup-with-summary nil
65
vm-summary-format "%3n %a %2d %3m %-19.19F %s\n"
66
mail-archive-file-name "~/mail/Outbound")
70
; A whole lot of stuff for setting the Precedence header ...
71
(setq mail-precedence-key-alist
72
'((?0 . "special-delivery")
81
(defun mail-precedence-as-key ()
82
"Set precedence by looking up last command char in mail-precedence-key-alist"
84
(message "%s" (concat "Precedence ["
85
(mapconcat '(lambda (c) (char-to-string (car c)))
86
mail-precedence-key-alist "")
88
(let* ((key (read-char))
89
(prec (assoc key mail-precedence-key-alist)))
90
(if prec (mail-precedence (cdr prec))
91
(error "mail-precedence-as-key `%s' not found" key))))
93
(defun mail-precedence-as-key-send-and-exit (arg)
94
"Set precedence by looking up last command char in mail-precedence-key-alist,
95
then call send-and-exit."
97
(mail-precedence-as-key)
98
(execute-kbd-macro ""))
100
(defun mail-precedence (prec)
102
(mail-position-on-field "Precedence")
105
(delete-region (point) p)
107
(insert "Precedence: " prec)
110
(defun mail-mode-setup-keys ()
111
(local-set-key "" 'mail-precedence-as-key)
112
(local-set-key "p" 'mail-precedence-as-key-send-and-exit))
113
(add-hook 'mail-mode-hook 'mail-mode-setup-keys)
114
(add-hook 'vm-mail-mode-hook 'mail-mode-setup-keys)
119
; A quick tutorial on VM's MIME display variables.
121
; vm-display-using-mime controls whether MIME is displayed specially
122
; at all. Default value is t.
124
; vm-auto-decode-mime-messages controls whether a MIME message is
125
; decoded when the message is selected. Decoding means parsing the
126
; message to figure out what MIME types are in it. This can be
127
; slow for large messages, so you might not want it to happen
128
; automatically. Default value is t.
130
; vm-auto-displayed-mime-content-types controls which MIME types
131
; are displayed immediately after the message is decoded.
132
; Default value is ("text" "multipart").
134
; vm-auto-displayed-mime-content-type-exceptions lists exceptions
135
; to the auto-displayed types. So you can specify "text" as an
136
; auto-displayed type and '("text/html") as the exceptions list to avoid
137
; immediate display of text/html. Default value is nil.