# HG changeset patch # User markus schnalke # Date 1340620646 -7200 # Node ID 92cbd3fa1c40dde5f9a4ed024135ea8226115c37 # Parent 4a1f5ec6220ddadc6630add9419623ece59366a3 Wrote text about displaying mime messages. diff -r 4a1f5ec6220d -r 92cbd3fa1c40 discussion.roff --- a/discussion.roff Mon Jun 25 10:07:33 2012 +0200 +++ b/discussion.roff Mon Jun 25 12:37:26 2012 +0200 @@ -2241,7 +2241,134 @@ .U3 "Showing MIME Messages .P -FIXME +The program +.Pn mhshow +had been written to display MIME messages. +It implemented the conceptional view of the MIME RFCs. +Nmh's +.Pn mhshow +handled each MIME part independently, presenting them separately +to the user. +This does not match today's understanding of email attachments, +where displaying a message is seen to be a single, integrated operation. +Today, email messages are expected to consist of a main text part +plus possibly attachments. +They are not any more seen to be arbitrary MIME hierarchies with +information on how to display the individual parts. +I adjusted +.Pn mhshow 's +behavior to the modern view on the topic. +.P +Note that this section completely ignores the original +.Pn show +program, because it was not capable to display MIME messages +and is no longer part of mmh. +Although +.Pn mhshow +was renamed to +.Pn show +in mmh, this section uses the name +.Pn mhshow , +in order to avoid confusion. +.P +In mmh, the basic idea is that +.Pn mhshow +should display a message in one single pager session. +Therefore, +.Pn mhshow +invokes a pager session for all its output, +whenever it prints to a terminal. +.Ci a4197ea6ffc5c1550e8b52d5a654bcaaaee04a4e +In consequence, +.Pn mhl +does no more invoke a pager. +.Ci 0e46503be3c855bddaeae3843e1b659279c35d70 +With +.Pn mhshow +replacing the original +.Pn show , +output from +.Pn mhl +does not go to the terminal directly, but through +.Pn mhshow . +Hence, +.Pn mhl +does not need to invoke a pager. +The one and only job of +.Pn mhl +is to format messages or parts of them. +The only place in mmh, where a pager is invoked is +.Pn mhshow . +.P +.Pe mhshow-show-* +profile entries can be used to display MIME parts in a specific way. +For instance, PDF and Postscript files could be converted to plain text +to display them in the terminal. +In mmh, the displaying of MIME parts will always be done serially. +The request to display the MIME type `multipart/parallel' in parallel +is ignored. +It is simply treated as `multipart/mixed'. +.Ci d0581ba306a7299113a346f9b4c46ce97bc4cef6 +This could already be requested with the, now removed, +.Sw -serialonly +switch of +.Pn mhshow . +As MIME parts are always processed exclusively , i.e. serially, +the `%e' escape in +.Pe mhshow-show-* +profile entries became useless and was thus removed. +.Ci a20d405db09b7ccca74d3e8c57550883da49e1ae +.P +In the intended setup, only text content would be displayed. +Non-text content would be converted to text by appropriate +.Pe mhshow-show-* +profile entries before, if possible and wanted. +All output would be displayed in a single pager session. +Other kinds of attachments are ignored. +With +.Pe mhshow-show-* +profile entries for them, they can be displayed serially along +the message. +For parallel display, the attachments need to be stored to disk first. +.P +To display text content in foreign charsets, they need to be converted +to the native charset. +Therefore, +.Pe mhshow-charset-* +profile entries used to be needed. +In mmh, the convertion is done automatically by piping the text through +the +.Pn iconv +command, if necessary. +.Ci 2433122c20baccb10b70b49c04c6b0497b5b3b60 +Custom +.Pe mhshow-show-* +rules for textual content might need a +.Cl "iconv -f %c %f | +prefix to have the text converted to the native charset. +.P +Although the convertion of foreign charsets to the native one +has improved, it is not consistent enough. +Further work needs to be done and +the basic concepts in this field need to be re-thought. +Though, the default setup of mmh displays message in foreign charsets +correctly without the need to configure anything. + + +.ig + +.P +mhshow/mhstore: Removed support for retrieving message/external-body parts. +These tools won't download the contents automatically anymore. Instead, +they print the information needed to get the contents. If someone should +really receive one of those rare message/external-body messages, he can +do the job manually. We save nearly a thousand lines of code. That's worth +it! +(The profile entry `nmh-access-ftp' and sbr/ruserpass.c for reading +~/.netrc are gone now.) +.Ci 55e1d8c654ee0f7c45b9361ce34617983b454c32 + +..