this post was submitted on 06 Jul 2024
1 points (100.0% liked)

Emacs

2190 readers
1 users here now

Our infinitely powerful editor.

founded 4 years ago
MODERATORS
1
Emacs RFC 2646 email flowing (idiomdrottning.org)
submitted 4 months ago* (last edited 4 months ago) by Sandra@idiomdrottning.org to c/emacs@lemmy.ml
 

Emacs RFC 2646 email flowing

Heck it Emacs!

A few months ago I fixed a bug in RFC 2646 handling where the last paragraph wouldn't get reflowed unless I remembered to add a hard newline (that is, a newline with the 'hard text property) after it, at EOT. I needed to hit one extra RET at the end. All other paragraphs would be wrapped, not just the last one.

(I even bugged @jas@fosstodon.org about it.)

But it still didn't always work and today I tried to get to the bottom of why, spending the entire day debugging it, finally realizing that... It's not even being called when there's only one paragraph in the email. I wasted so much time before realizing that! And then getting to the bottom of why that wasn't happening was the opposite of easy but it turnes out that Gnus by design doesn't call the fill-flowed-encode function when there aren't any hard newlines in the buffer. Which there aren't gonna be if it's a single-paragraph letter ๐Ÿคฆ๐Ÿปโ€โ™€๏ธ

Use-hard-newlines is beyond useless since that's always buffer-local and the text-reflowing is being done in a temp buffer. Instead since 2010 we're supposed to set mml-enable-flowed to true. But don't worry, fans of the messages-are-flowing package, I'm gonna send patches there to reflect that. I have a bunch of other changes to that package too since I've been using that a lot this summer.

This is all in bug#71017 (cursed palindrome!) for people who wanna dig in ๐Ÿ‘ฉ๐Ÿปโ€๐Ÿซ

@emacs@lemmy.ml

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here