VM randomness

VM is the mailer I use. It's pretty damn neat, but sometimes it annoys me, and the configuration can occasionally be a bit byzantine. So I'm going to throw a few random VM titbits here.

Fetch local mail only

When you're more offline than on: VM doesn't know this, so it keeps trying to fetch mail from your POP mailbox. This chunk of code gives you a function, vm-get-local-mail, that only checks things that look like local spool files.

(defun vm-get-local-mail() "Fetch mail from local spool(s) only" (interactive) (let ((vm-spool-files (delete nil (mapcar (lambda(x) (if (or (string-match vm-recognize-pop-maildrops (nth 1 x)) (string-match vm-recognize-imap-maildrops (nth 1 x))) nil x)) vm-spool-files)))) (vm-get-new-mail)))

Displaying random character sets

This is pretty ropey. It seems like every time I get it working, something changes and it stops working again. Emacs 20, in particular, breaks everything, waits for you to fix it, then breaks it all again. I recently took a hammer to this and rebuilt it from scratch, so it's now far less crufted than it used be. Of course, it probably doesn't cover all the junk that the old settings used, either.

;; Trying to bring sanity to my text display ;; Firstly, things that will display okay in my default charset ;; NB THIS DOES NOT WORK IF THE TRANSFER-ENCODING IS NOT ONE OF 7bit, 8bit, or ;; binary. (setq vm-mime-default-face-charsets nil) (add-to-list 'vm-mime-default-face-charsets "us-ascii") (add-to-list 'vm-mime-default-face-charsets "iso-8859-1") (add-to-list 'vm-mime-default-face-charsets "Windows-1252") ;; not quite ;; Secondly, things that won't display in the default font and thus require ;; mapping to a new font. ;; NB THIS NEEDS ALL THE FONTS TO BE THE SAME HEIGHT IN GNU EMACS. (add-to-list 'vm-mime-mule-charset-to-coding-alist (list "iso-8859-15" 'raw-text)) (add-to-list 'vm-mime-mule-charset-to-coding-alist (list "utf-8" 'raw-text)) (add-to-list 'vm-mime-mule-charset-to-coding-alist (list "GB2312_CHARSET" 'euc-cn)) (add-to-list 'vm-mime-mule-charset-to-coding-alist (list "big5" 'big5)) ;; -*-*-medium-r-normal-*-15-140-*-*-c-*-iso10646-1 ;; is a nice Unicode font ;; This seems to be for emacs < 20, or fsfemacs non-mule ;; (setq vm-mime-charset-font-alist nil) ;; (add-to-list ;; 'vm-mime-charset-font-alist ;; '("iso-2022-jp" "-jis-*-*-*-*-*-15-140-*-*-*-90-jisx0208.1983-*")) ;; (add-to-list ;; 'vm-mime-charset-font-alist ;; '("iso-8859-15" "-*-*-medium-r-*-*-15-140-*-*-*-90-iso8859-15"))))

Coping with Re:

;; Mailman fux0rs my world. (setq vm-subject-ignored-prefix "^\\(\\(\\[[a-z.]+\\] *\\)*re: *\\)+")

Toys you might want

vm-complain.el, for spam complaints - see http://www.laas.fr/~felix/despam.html

vm-multidom.el, for handling your many email addresses. It can be found on Noah Friedman's emacs hacks page, along with some other fun toys.

A patch for VM 6.95 to allow "leave mail on server/delete from server when deleted locally" behaviour. Imperfect, buggy, but usable.


Waider