Open morganwillcock opened 3 years ago
What do you see when you run C-h C RET
? You probably want to change your default from iso-latin-1.
It is using iso-latin-1:
Coding system for saving this buffer:
Not set locally, use the default.
Default coding system (for new files):
1 -- iso-latin-1-dos (alias: iso-8859-1-dos latin-1-dos)
But to my mind the default shouldn't have to be changed to accommodate saving a buffer that is created and edited by a package rather than by the user.
For outputs that can be represented in iso-latin-1 I don't think you'd see that prompt. To me this seems like the correct behavior: the user wants a specific encoding to be used per their config, and when the output has characters that can't be encoded that way, the user is both shown the unrepresentable characters and is prompted for a different option. Is there anything inherently utf about email that the encoding should be forced by this package, ignoring the user preferences?
I think we'll have to agree to disagree. I wouldn't say that the default encoding is meant to force all output to comply with that encoding or prompt the user. Other packages (such as Org mode) will create utf-8 buffers and write utf-8 encoded files without any prompts.
That's a fair point, I didn't realize that org is doing its own thing with org-html-coding-system
and assumed they were respecting the emacs default. Maybe it would make sense to make a similar defcustom
for org-msg
. @jeremy-compostella would you accept a pull request with that?
When previewing a message on Windows it looks like the default text encoding can cause an encoding selection prompt to appear in the minibuffer. It is triggered by
(write-file tmp-file)
and displays the message:utf-8 is the default choice at the prompt and selecting it lets everything proceed as normal, but presumably something needs to set a compatible encoding before
write-file
is called to cover the case where the default encoding is not compatible?