PlanDuSite ModificationsRécentes Nouvelles SectionElisp CommentFaire

ViewMailAndMime

Q: Does anyone know if it is possible to get ViewMail to allow you to choose which subpart of a multipart mime message it will display? It seems that some mailers will embed attachments in the html part of a multipart message, and since my VM is set to prefer to display text/plain I don’t get to see the attachments.

A: The customization variable ‘vm-mime-alternative-select-method’ can be used specify the choice. A value of ‘best will allow the best alternative to be displayed, typically html. For this to work, however, you should have configured your Emacs to display html, using packages such as w3 or w3m. The default value is ‘best-internal, which means choose the best alternative that can be displayed internally in Emacs. Again, if you have configured your Emacs to display html, it will be chosen. Otherwise, text/plain alternative will be displayed.

The variable can also be set to ‘all, in which case all the alternatives are shown, either in full form or as buttons.

Before ViewMail 8.1.x, the variable ‘vm-mime-show-alternatives’ can be used to show all the alternatives.

Q: Can one use lynx to convert html to plain text and display it in VM?

A: Yes. You should first ensure that text/html is not declared as an extenal content-type, by setting ‘vm-mime-external-content-types’ and/or ‘vm-mime-external-content-type-exceptions’ appropriately. Include the following lines in your .vm file to convert html to plain text.

  (add-to-list 'vm-mime-type-converter-alist
      '("text/html" "text/plain"
        "lynx -force_html -dump -pseudo_inlines -stdin"))