The very latest version of mutt in the unstable branch allows any MIME type, so finally mutt supports the chemical MIME type. This should work back down into the stable releases of mutt. I will keep this page up to date on progress. Currently you have to get the latest unstable snapshot or the CVS version. I expect the change to appear in the next actual unstable version, which will be 1.3.11. This has just been released, but I have yet to check it. Below is how you alter earlier versions of mutt to support chemical MIME types.
The information given here now refers to version 1.2.5i of mutt.
Adding a new mime type to mutt turns out to require very few changes to the code, although working them out was not so simple. This assumes that you have have version 1.2.5i or that you have altered an earlier version so that type "model" and type "video" actually work - see my general mutt page. First change two include files:-
mime.h
30,31c30
< TYPEVIDEO
---
> TYPEVIDEO,
> TYPECHEMICAL
globals.h
156c156
< const char *BodyTypes[] = { "x-unknown", "audio", "application", "image",
"message", "model", "multipart", "text", "video" };
---
> const char *BodyTypes[] = { "x-unknown", "audio", "application", "image",
"message", "model", "multipart", "text", "video", "chemical" };
Check that no newlines have appeared when you copy the above so each part of the patch is on a single line.
Note that the types defined in the enum in mime.h and in BodyTypes in globals.h must be in the same order.
Finally we have to use the new type in parse.c:-
251a252,253
> else if (mutt_strcasecmp ("chemical", s) == 0)
> return TYPECHEMICAL;
That's all, folks. It should work now.
Return to the Computational Chemistry Research Group page.