jeremy-compostella / org-msg

OrgMsg is a GNU/Emacs global minor mode mixing up Org mode and Message mode to compose and reply to emails in a Outlook HTML friendly style.
GNU General Public License v3.0
276 stars 57 forks source link

Paragraph wrapping and &npsb #117

Closed roblem closed 3 years ago

roblem commented 3 years ago

Consider an email body having long paragraphs like this:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Id faucibus nisl tincidunt eget nullam. Neque sodales ut etiam sit. Ac auctor augue mauris augue neque gravida in. Pellentesque diam volutpat commodo sed egestas egestas fringilla phasellus. Ultrices neque ornare aenean euismod elementum nisi quis eleifend. Congue eu consequat ac felis donec. Nisl tincidunt eget nullam non nisi est sit amet facilisis. Justo laoreet sit amet cursus sit amet dictum sit. Nulla facilisi nullam vehicula ipsum a arcu cursus. Erat nam at lectus urna duis. Ultricies tristique nulla aliquet enim tortor at auctor. Risus feugiat in ante metus dictum at tempor. Arcu risus quis varius quam quisque. Massa ultricies mi quis hendrerit dolor magna. Eu tincidunt tortor aliquam nulla facilisi. Cras fermentum odio eu feugiat. Interdum velit euismod in pellentesque massa placerat.

This previews as

org-msg-preview

And I can see the html for these paragraphs is like this:

Lorem ipsum dolor sit amet, consectetur 

If I manually remove the &npsp from the generated html, we get wrapping as you would expect: org-msg-preview-no-nbsp

I noticed that even with the &nbsp character, services like gmail and client such as Thunderbird seem to override it ok and wrap the text. Others like Protonmail, however do not and it looks like this: proton-mail-wrapping

obar commented 3 years ago

Did your lorem ipsum source have those non-breaking spaces? When I copy your message text into a draft and preview it, it wraps just as expected because there aren't any non-breaking spaces in what made it to github.

Of course you can use lorem-ipsum.el from melpa to make however many sentences or paragraphs you'd like, without hidden characters ;)

roblem commented 3 years ago

I can't reproduce this anymore whether I use the original website I pasted paragraphs in from or if I use the package you suggest. So closing. Apologies.