Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"# coding: utf-8" line when replying #32

Closed
wedens opened this issue Feb 28, 2020 · 5 comments
Closed

"# coding: utf-8" line when replying #32

wedens opened this issue Feb 28, 2020 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@wedens
Copy link

wedens commented Feb 28, 2020

I use org-msg with mu4e (1.2.0) and emacs 27.

When I reply to a message, # coding: utf-8 gets added at the end of the message. It's not present when I type the reply, so it's added by some hook. When I do org-msg-preview on the reply, this line is also added after the reply text.

html of the reply:

<html><body><div style="font-family:&quot;Arial&quot;;font-size:10pt;line-height:11pt;" id="content">
<p style="text-decoration:none;margin-bottom:0px;margin-top:10px;line-height:11pt;font-size:10pt;font-family:&quot;Arial&quot;;max-width:100ch;">
replying<br/></p>
</div><p># coding: utf-8
</p><!-- 2020-02-28 Fri 16:35 --><meta http-equiv="Content-Type" content="text/html;charset=utf-8"/><meta name="viewport" content="widthÞvice-width, initial-scale=1"/><meta name="generator" content="Org mode"/><meta name="author" content="wedens"/><div style="padding:3.0pt 0in 0in 0in;border-top:solid #e1e1e1 1.0pt;margin-bottom:20px;font-family:&quot;Arial&quot;;font-size:10pt;line-height:11pt;" align="left"><p style="text-decoration:none;margin-bottom:0px;margin-top:10px;line-height:11pt;font-size:10pt;font-family:&quot;Arial&quot;;max-width:100ch;"><b>
From</b>: <a style="color:#0071c5;color:black;text-decoration:none;" href="mailto:&quot;wedens&quot; &lt;mymail1@mymail.com&gt;">wedens</a><br/><b>
Subject</b>: test<br/><b>
To</b>: <a style="color:#0071c5;color:black;text-decoration:none;" href="mailto:&quot;wedens&quot; &lt;mymail0@mymail.com&gt;">wedens</a><br/><b>
Cc</b>: <br/><b>
Date</b>: Fri, 28 Feb 2020 16:35:20 +0700<br/></p></div>
<div style="font-family:&quot;Arial&quot;;font-size:10pt;line-height:11pt;" id="content">
<p style="text-decoration:none;margin-bottom:0px;margin-top:10px;line-height:11pt;font-size:10pt;font-family:&quot;Arial&quot;;max-width:100ch;">
test123<br/></p>
</div>
</body></html>

Is there some way to avoid this line being added?

org-msg related configuration:

(setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil "
        org-msg-startup "hidestars indent inlineimages")
(org-msg-mode +1)

PS: I'm not sure if it's related to org-msg and if it's not, I'll be glad for any pointers to where to look next.

@jeremy-compostella
Copy link
Owner

Hi,

First of all I don't use mu4e (I use gnus) but many people use the mu4e backend of org-msg successfully. My point is I cannot investigate unless you help me a little. In my opinion this is an issue of the org-msg-save-article-for-reply-mu4e function which may not be extracting the right portion of the original HTML message and include this # coding: utf-8. I suggest that you either investigate the org-msg-save-article-for-reply-mu4e by yourself or share a original HTML message with which you reproduce the issue.

Regards,
Jeremy

@jeremy-compostella jeremy-compostella added the help wanted Extra attention is needed label Mar 2, 2020
@wedens
Copy link
Author

wedens commented Mar 3, 2020

That's the html of the message I was replying to (just some text):

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!-- 2020-02-28 Fri 16:35 --><meta http-equiv="Content-Type" content="text/html;charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="generator" content="Org mode"/><meta name="author" content="wedens"/></head><body>
<div style="font-family:&quot;Arial&quot;;font-size:10pt;line-height:11pt;" id="content">
<p style="text-decoration:none;margin-bottom:0px;margin-top:10px;line-height:11pt;font-size:10pt;font-family:&quot;Arial&quot;;max-width:100ch;">
test123<br/></p>
</div>
</body></html>

Also, when I try to reply to it, emacs prompts me to select coding system and there are two buffers (other than message itself) open:

first buffer:

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!-- 2020-02-28 Fri 16:35 --><meta http-equiv="Content-Type" content="text/html;charset=utf-8"/><meta name="viewport" content="width�vice-width, initial-scale=1"/><meta name="generator" content="Org mode"/><meta name="author" content="wedens"/></head><body><div align="left">
From: "wedens" &lt;xxxxx@xxxx&gt;<br>
Subject: test<br>
To: "wedens" &lt;xxxxx@xxxxx&gt;<br>
Cc: <br>
Date: Fri, 28 Feb 2020 16:35:20 +0700<br>
</div>
<hr>

<div style="font-family:&quot;Arial&quot;;font-size:10pt;line-height:11pt;" id="content">
<p style="text-decoration:none;margin-bottom:0px;margin-top:10px;line-height:11pt;font-size:10pt;font-family:&quot;Arial&quot;;max-width:100ch;">
test123<br/></p>
</div>
</body></html>

second buffer:

These default coding systems were tried to encode text
in the buffer ‘87mu93qckn.fsf@xxxxx’:
  (utf-8 (206 . 4194270))
However, each of them encountered characters it couldn’t encode:
  utf-8 cannot encode these: �

Click on a character (or switch to this window by ‘C-x o’
and select the characters by RET) to jump to the place it appears,
where ‘SPC u g a’ will give information about it.

Select one of the safe coding systems listed below,
or cancel the writing with C-g and edit the buffer
   to remove or modify the problematic characters,
or specify any other coding system (and risk losing
   the problematic characters).

  raw-text no-conversion

Seems like something weird is goning on here: <meta name="viewport" content="width�vice-width, initial-scale=1"/> (note some weird character in content attribute).

@jeremy-compostella
Copy link
Owner

I tried to reproduce this issue but I could not. Could you disable your Emacs configuration and try again ?

@jeremy-compostella
Copy link
Owner

Any update ?

@wedens
Copy link
Author

wedens commented Apr 10, 2020

No, sorry. I'm still unsure why it happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants