This commit is contained in:
parent
7dcb9b6a51
commit
735101cd4f
1 changed files with 25 additions and 9 deletions
|
@ -8,18 +8,34 @@ draft: true
|
||||||
|
|
||||||
[Kakoune]: https://kakoune.org
|
[Kakoune]: https://kakoune.org
|
||||||
|
|
||||||
|
[^html]: The first email was sent in 1971 --- HTML was specified in 1990.
|
||||||
|
|
||||||
|
[TOC]
|
||||||
|
|
||||||
As I've [mentioned before](./email-in-kakoune.md), I like using [Kakoune] for
|
As I've [mentioned before](./email-in-kakoune.md), I like using [Kakoune] for
|
||||||
reading & writing emails. Of course, Kakoune is a text editor, not a _rich text_
|
reading & writing emails. Of course, Kakoune is a text editor, not a _rich text_
|
||||||
editor. It operates on UTF-8 _plaintext_ --- which means that the emails I write
|
editor. It operates on UTF-8 _plain text_ --- which means that the emails I
|
||||||
need to be in plaintext, too.
|
write need to be in plain text, too.
|
||||||
|
|
||||||
As I went down this path, I quickly discovered that I needed an **email
|
As it turns out, plain-text email (which predates HTML by decades[^html]) hasn't
|
||||||
formatter**. I eventually wrote [`mailfmt`](https://git.sr.ht/~ficd/mailfmt) to
|
really left a "legacy" so much as it _hasn't actually gone anywhere_. Many
|
||||||
fill this niche. It provides consistent paragraph spacing, hard-wrapping and
|
developers swear by it; some are even so committed as to automatically filter
|
||||||
paragraph reflow, while preserving Markdown syntax, email headers, quotes,
|
`text/html` mail as spam. If you want to learn more, you can begin by reading
|
||||||
sign-offs, and signature blocks. Additionally, the wrapped output can be made
|
[Drew DeVault's post](https://drewdevault.com/2016/04/11/Please-use-text-plain-for-emails.html),
|
||||||
safe for passing to a Markdown parser. This is useful if you want to build an
|
[useplaintext.email](https://useplaintext.email/#why-plaintext), and sourcehut's
|
||||||
HTML email from plain-text.
|
[mailing list etiquette](https://man.sr.ht/lists.sr.ht/etiquette.md) guide.
|
||||||
|
|
||||||
|
As I went down `text/plain` path, I quickly learned that I needed an **email
|
||||||
|
formatter**. Plain text is like source code. You can't rely on the recipient's
|
||||||
|
mail client to render it in a certain way --- most often, what you see is
|
||||||
|
_exactly_ what they get.
|
||||||
|
|
||||||
|
I eventually wrote [`mailfmt`](https://git.ficd.sh/ficd/mailfmt) to fill this
|
||||||
|
niche. It provides consistent paragraph spacing, hard-wrapping and paragraph
|
||||||
|
reflow, while preserving Markdown syntax, email headers, quotes, sign-offs, and
|
||||||
|
signature blocks. Additionally, the wrapped output can be made safe for passing
|
||||||
|
to a Markdown parser. This is useful if you want to build an HTML email from
|
||||||
|
plain-text.
|
||||||
|
|
||||||
`mailfmt` open-source under the ISC license, and is available on
|
`mailfmt` open-source under the ISC license, and is available on
|
||||||
[PyPI](https://pypi.org/project/mailfmt/) for installation with tools like
|
[PyPI](https://pypi.org/project/mailfmt/) for installation with tools like
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue