From 934308a95aa0c75029c731a64aa99664c4579b29 Mon Sep 17 00:00:00 2001 From: Bence Ferdinandy Date: Thu, 4 Jan 2024 21:22:57 +0100 Subject: add info about quoting html when replying We can't add this to the default template so add info on wiki on how to solve it. Signed-off-by: Bence Ferdinandy Acked-by: Robin Jarry --- configurations/htmlquote.md | 21 +++++++++++++++++++++ configurations/index.md | 1 + 2 files changed, 22 insertions(+) create mode 100644 configurations/htmlquote.md diff --git a/configurations/htmlquote.md b/configurations/htmlquote.md new file mode 100644 index 00000000..2e7d2def --- /dev/null +++ b/configurations/htmlquote.md @@ -0,0 +1,21 @@ +--- +title: "aerc-wiki: Configurations/HTML quoting in replies" +--- + +Sometimes the email you get only has `text/html`. If you quote reply this, the +default [quoted_reply +template](https://git.sr.ht/~rjarry/aerc/tree/master/item/templates/quoted_reply) +will dump the entire html with all the markup into the quote. You can update +this template to behave differently if replying to html. For example, add the +html filter shipped with aerc to construct a more sensible text to quote: + +``` +{{ if eq .OriginalMIMEType "text/html" -}} +{{- trimSignature (exec `~/.local/softwarefromsource/aerc/filters/html` .OriginalText) | quote -}} +{{- else -}} +{{- trimSignature .OriginalText | quote -}} +{{- end}} +``` + +Note, that since this filter comes with a third-party dependency (w3m), this +will not be added to the default template shipped with aerc. diff --git a/configurations/index.md b/configurations/index.md index 85be2975..5f819a92 100644 --- a/configurations/index.md +++ b/configurations/index.md @@ -5,3 +5,4 @@ title: "aerc-wiki: Configurations" - [colors](configurations/colors.md) - [notmuch](configurations/notmuch.md) - [style sets](configurations/stylesets.md) +- [html quoting in replies](htmlquote.md) -- cgit v1.2.3-54-g00ecf