On Fri, Apr 28, 2017 at 07:16:19PM +1000, Erik Christiansen wrote: >On 27.04.17 09:21, Darac Marjal wrote: >> On Wed, Apr 26, 2017 at 08:54:45PM +0000, Grant Edwards wrote: >> > OK, so how does one do that within mutt? >> >> I would suggest that the most prudent approach is to use a lightweight >> markup language (LML). LMLs tend to be designed such that, while they >> CAN be rendered into a presentation form, the source code is also >> (relatively) legible. >> >> So, let's say I wanted to write something in bold. > >Ahem, message composition is performed in the editor, either vim or >emacs for the majority of mutt users, I expect. And vim is >latex-friendly (Try :help latex). Then there's the vim-markdown plugin >if that's preferred. > >Either way, format faffing is exclusively editor work. It has nothing >to do with the lid on the SMTP pipe - the MUA. That deals with composed >messages - it should not recompose them in transit.
True. But at the moment, lets say that I add some enriched text codes here. OK, so vim does nothing with that. But I then type ":set filetype=.." (edit: I WAS initially writing this as markdown, but thought enriched text would illustrate my point better. Vim doesn't seem to handle enriched text. Emacs does, apparently, though) and hurrah, vim now shows that as bold. Yay, I'm composing my email with style!
But my point is that, at the moment, only the editor knows that I am writing in text/enriched. When I quit out, the message will be set as text/plain and no-one will see my beautiful emphasis!
What I can do, though, and I shall for this message, is set the MIME type to text/enriched. That tells recipients that my message needs interpretation.
> >> In HTML that could be <spanstyle="font-weight:bold">bold</span.in>> LaTeX, it would be \textbf{bold}. But in markdown, it's simply >> **bold**. >> >> A good LML would have a MIME type associated with it (I see that >> markdown does, but reStructuredText doesn't, for example), so it can >> either be viewed (as source) in the pager or rendered (as presentation >> form) by a mailcap entry. > >Is it necessary to send the body as an attachment in order to awaken >that mime stuff?
I'm only a user of mutt, but it is my understanding that mutt always uses MIME. MIME parts can have two dispositions: attachment or inline. The body, detached signatures (as added by mailing lists) etc are usually inline while files sent with the message are attachments.
My understanding is that mutt composes a message by invoking an editor on a temporary file. That temporary file is then added to the MIME tree with content-type:text/plain and content-disposition:inline. For demonstration purposes, this message will have one MIME part of content-type:text/enriched and content-disposition:inline.
Let's see how this works.
> >When I had to pretty-font a report for management over a decade ago, I >composed it in vim, then performed a fontification in openoffice, and >gave them a M$-compatible attachment. Problem fixed. > >Erik > >-- >HTML is not email, and email doesn't contain HTML, so please turn HTML >formatting OFF in your email client. We have filters in place that will >reject your message if your posting contains HTML. > - http://gpl-violations.org/mailinglists.html
-- For more information, please reread.

Attachment: signature.asc
Description: PGP signature

Reply via email to