Gmail is enticing because of its search and easy handling of attachments and images, but there’s a lot of inertia for me to overcome. I’m a command-line mail person from way back, and I use my inbox as my to-do list. Currently, I have
8,413 8,462 things to do. Seriously. No, really. Now you understand why it takes me a while to write back to my emails, and why it takes me a while to approve comments here. 🙂
So I’m still using mutt for now, and I have to say that it’s pretty nice 95% of the time. There were two things that annoyed me though:
- When you spawn an external viewer for a file, mutt pauses until you close the viewer program to resume
- My default set of viewers didn’t have bindings for PowerPoint (this is for my Linux machine)
In trying to fix #2, I found out how to fix #1. Some searching and digging on mutt.org uncovered this delightful page. It turns out that mutt is single-threaded, which is why it hangs to invoke an external viewer. But after the viewer closes, mutt cleans up the temporary document, so you can’t just run the viewer in the background. The solution is to write a script that copies the temp doc to a different location. Gary Johnson wrote that script (mutt_bgrun); here’s a local copy that you can save and make executable.
Now let’s fix #2. I’m not a MIME-maniac, but lets assume that you have OpenOffice (the ooffice executable) on your system. Add the following to the bottom of your ~/.mailcap file:
# view in OOffice viewer for PowerPoint
application/vnd.ms-powerpoint;mutt_bgrun ooffice %s; test=sh -c 'test $DISPLAY'
application/x-mspowerpoint; mutt_bgrun ooffice %s; test=sh -c 'test $DISPLAY'
application/ppt; mutt_bgrun ooffice %s; test=sh -c 'test $DISPLAY'
The fields are delimited with semicolons. The first field is the MIME type. The second field is how to invoke a viewer (note the use of mutt_bgrun so that we run the ooffice viewer in a different process in the background). The last field is a test to determine if you’re running X. If you aren’t running X, you might be able to install some sort of ppt2text viewer and then add .mailcap entries like
application/ppt; ppt2text %s; copiousoutput to view in text. The copiousoutput means that ppt2text might output a lot of data to stdout, and hints that a pager like “less” might be handy.
Once you make the change to your ~/.mailcap file, you can immediately try to view a .ppt attachment in mutt to see if it works.
P.S. Some mail programs won’t label data as “application/vnd.ms-powerpoint” or similar; instead, they use the generic label “application/octet-stream”, which means “this is a binary blob–good luck!” Once again, http://www.spocom.com/users/gjohnson/mutt/ is your friend, this time with a file http://www.spocom.com/users/gjohnson/mutt/mutt_octet_view as a generic external viewer, plus an entry like this in your ~/.mailcap file:
# Try to handle octet-stream
application/octet-stream; mutt_octet_view -x %s; test=sh -c 'test $DISPLAY'
application/octet-stream; mutt_octet_view -v %s
application/octet-stream; mutt_octet_view %s; copiousoutput
Although I have to say, the autosave of drafts in Gmail is nice, and has already saved my bacon once. What UI person decided that the backspace key should be like clicking the back button?? You’re typing a long email, you click outside the textarea without realizing it and lose the cursor focus, then you hit the backspace button and you lose your entire email. Grr. If Gmail hadn’t autosaved, I would have been pretty angry. And as long as I’m ranting about web annoyances: you owe it to yourself to check out the Resizeable Textarea extension. You just click on the bottom/right border of the textarea and drag–nice for those ginormous emails. Resizeable Textarea is my favorite extension since ListZilla, with the simplest, most intuitive UI for me since miniT.
Will I ever switch over to a web-based email system? Well first, I just have to knock out 8,462 more emails to various folks so I have a clean slate. Sigh. What do you use to make email more manageable?