aboutsummaryrefslogtreecommitdiffstats
path: root/doc/aerc-jmap.5.scd
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-07-04 17:09:27 +0200
committerRobin Jarry <robin@jarry.cc>2023-07-17 10:23:54 +0200
commitcf061e1b0b536da1cc401c19af456ea373c47e6e (patch)
tree517611bf2bc11aeb7e3b2c097451616cc0ea30e9 /doc/aerc-jmap.5.scd
parenta9fdf417662bd203dbd923126ad6233e965cfc2d (diff)
downloadaerc-cf061e1b0b536da1cc401c19af456ea373c47e6e.tar.gz
compose: always use cr-lf line endings
.eml files are universally formatted with DOS line-endings, per RFC5322. Make sure to replace line endings with CRLF before sending the message. Always present CRLF files to the text editor. If the editor forces LF line endings, convert them back to CRLF. Text editors (vim and nvim at least) detect the .eml extension and force dos line endings. Emacs seems not to care and will use whatever line endings are present in the file. Kakoune seems to force unix line endings and does not care about the contents of the file. Notes: * add explicit calls to Truncate() to ensure any trailing content is stripped from the file when overwriting with shorter content. * NewCRLFReader cannot be reused since we need buffered and unbuffered versions of it (for GetBody and {Set,append}Contents, respectively). Link: https://datatracker.ietf.org/doc/html/rfc5322 Link: https://github.com/vim/vim/blob/v8.2.3583/runtime/ftplugin/mail.vim#L29-L35 Link: https://github.com/neovim/neovim/blob/v0.6.0/runtime/ftplugin/mail.vim#L29-L35 Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com> Tested-by: Koni Marti <koni.marti@gmail.com>
Diffstat (limited to 'doc/aerc-jmap.5.scd')
0 files changed, 0 insertions, 0 deletions