Frederick888 / external-editor-revived

External Editor Revived is a Thunderbird MailExtension which allows editing emails in programs such as Vim, Neovim, Emacs, etc.
GNU General Public License v3.0
110 stars 6 forks source link

New line characters are inconsistent (again) #62

Closed TE-0000105050 closed 1 year ago

TE-0000105050 commented 1 year ago

Description

In the text file that are passed from External Editor Revived to an editor, the mail body has only LFs as the new line characters, while the header has CR-LFs as new line characters.

This is contrary to the issue #53.

Could you invetigate and fix the issue, please?

Thank you,

Environment

Configuration

Editor: Emacs Shell: C:\cygwin64\bin\bash.exe

Logs

12:34:41.805 This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”. MimeMessageUtils.jsm:148:23
12:34:41.807 ExtEditorR sending:  
Object { configuration: {…}, tab: {…}, composeDetails: {…} }
​
composeDetails: Object { from: "foobar@example.com", overrideDefaultFcc: false, type: "draft", … }
​​
additionalFccFolder: ""
​​
attachVCard: false
​​
attachments: Array []
​​
bcc: Array []
​​
body: "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><style></style></head><body style=\"font-family: -moz-fixed; white-space: pre-wrap;\">Mail body.<br><br>-- <br>Foo Bar<br><br></body></html>"
​​
cc: Array []
​​
customHeaders: Array []
​​
deliveryFormat: null
​​
deliveryStatusNotification: false
​​
followupTo: Array []
​​
from: "foobar@example.com"
​​
identityId: "id1"
​​
isPlainText: true
​​
newsgroups: Array []
​​
overrideDefaultFcc: false
​​
overrideDefaultFccFolder: null
​​
plainTextBody: "Mail body.\n\n-- \nFoo Bar"
​​
priority: "normal"
​​
relatedMessageId: 1
​​
replyTo: Array []
​​
returnReceipt: false
​​
subject: ""
​​
to: Array []
​​
type: "draft"
​​
<prototype>: Object { … }
​
configuration: Object { version: "0.4.0", shell: "C:\\cygwin64\\bin\\bash.exe", template: "C:/Program\\ Files/Emacs/emacs-28.1/bin/emacsclientw.exe /path/to/temp.eml", … }
​
tab: Object { id: 6, index: 0, windowId: 53, … }
​
<prototype>: Object { … }
background.js:115:11

Screenshots

inconsistent-new-lines

Frederick888 commented 1 year ago

I guess Thunderbird made some changes to make this consistent across different platforms.

Could you try artefacts from #63?

TE-0000105050 commented 1 year ago

Hello Frederick,

I've just tried CI #148. Is that right? I've verified that the combination of its thunderbird-extension and windows-latest-nightly-native-messaging-host fixes this issue.

Thank you, very much!

Frederick888 commented 1 year ago

Thank you for testing! I just released this fix in v0.4.1.