07 April, 2010
The articles on getting started with Wanderlust at emacs-fu are great (Part 1 Part 2 Part 3) and left me with a working mail client. Unfortunately, it worked in a way I didn't quite like as much as Mutt.
Here's how I fixed it.
All of the lisp bits in this post can go in your .wl file, so you don't have to pollute your .emacs.
Summary linesThe first thing that bothered me about Wanderlust was the short summary lines. I have a fairly high-resolution monitor, and there was a lot of wasted space in the summary buffer. Even on my low-resolution laptop, I had empty space to the right of the truncated subjects. Here's the solution:
I was also a bit miffed by the date format and spacing of the elements in the summary lines, so I swapped those around to be correct (that is, British):
(setq wl-summary-line-format "%n%T%P %D/%M (%W) %h:%m %t%[%25(%c %f%) %] %s")
(setq wl-summary-width 150)
StickinessBeing used to Mutt, I kept pressing "q" to close the message preview. In Wanderlust, when shoeing an e-mail, you don't actually jump into its buffer, so all this kept doing was closing the summary. If you had any marks on messages or operations that hadn't been executed, this could be a real pain because they were all forgotten. I found that you could make a summary "sticky" with M-s, which makes the contents of the summary persistent in a Wanderlust session, but you have to remember to actually do that when you open a summary buffer. Then I found out how to make all summaries sticky by default:
(setq wl-summary-always-sticky-folder-list t)
Virtual FoldersOne of the things I liked most about Mutt was the powerful searching functions. Wanderlust has something even better: virtual folders.
Use V to create one. You can search by body, from, to, etc., but also by Flag, so a search for Flag of Unread shows all new mails. You can also use ! to invert the search: !Flag, for example.
V can be used in a summary or from the Folders buffer. If you press it at your Desktop item, the virtual folder pulls mails from everything beneath it.
Even better, if you use "m f" to make a virtual folder in the folders view, it becomes a new mailbox. And, if you save the folder buffer, it updates your .folders file. You can put nicer names on them, too. I have these two items in my .folders:
Which got me out of the habit of moving read mail into a separate mailbox, as I used to have done automagically in Mutt - in-box zero makes me feel good. This is a good thing, because if you're using the brilliant remember-mode, the e-mails don't move around after you've added to-do items that link to them.
Automatic signatureI know you can press a few keystrokes and insert your signature in a draft e-mail, but I don't like it. Mutt used to append the signature automatically.
Using mu-cite, I added this behaviour again. Notice how bad at lisp I am - I cobbled this together from bits I found on the Internet. 1=1 /is/ true, though :)
(add-hook 'mail-citation-hook 'mu-cite-original)
(setq signature-file-name "~/.signature"
;; Add support for (signature . "filename")
(unless (assq 'signature wl-draft-config-sub-func-alist)
'((signature . wl-draft-config-sub-signature))))
(defun mime-edit-insert-signature (&optional arg)
"Redefine to insert a signature file directly, not as a tag."
;; Keep track of recently used Email addresses
(defun wl-draft-config-sub-signature (content)
"Insert the signature at the end of the MIME message."
(let ((signature-insert-at-eof nil)
Cite the way I like itI also always had a custom line at the start of any replies/forwards. Here's how to do that in Wanderlust.
(setq mu-cite-top-format '("On " date "," from " spake thus:\n"))
Black and white printingI haven't tried this yet, but I found a note in the Wanderlust docs about printing to a black and white printer.
(setq wl-ps-print-buffer-function 'ps-print-buffer)
Calling fetchmailAt first I was doing this in an eshell buffer. I don't like to have it run automatically, because sometimes I want to read my mail on the web, but ultimately like to download my mail to local Maildirs. You'd understand if you had to live with the regular mail service fubars here at Coventry University :)
I've bound it to C-x M-m, so it matches up with C-x m (write e-mail).
(defun fetchmail-fetch ()
(global-set-key "\C-x\M-m" 'fetchmail-fetch)
X-FaceJust for the fun of it, I have X-Face support. I've checked my e-mail for the past month and not a single other person inserts an X-Face header line, so there's not much point other than to see my own grinning face when I look in my sent mail folder. Still, that's enough reason for me.
First add X-Face to the visible field list:
And then just make sure you have a suitable ~/.xface file. By default, wl-auto-insert-x-face is set to t, so it should just work.
Feel free to e-mail me at csx239 AT coventry DOT ac DOT uk if you want to have someone to e-mail that uses x-face. It would make my day.
Links to this post: