Comments (10)
Hi,
The <div>...</div>
should be present because:
-
with the
gnus
mail user agent this is added by thegnus-article-browse-html-article
-
with
mu4e
Mail User Agent, theorg-msg-save-article-for-reply-mu4e
function should have added the<div>...</div>
(see below).326 (defun org-msg-save-article-for-reply-mu4e ()
327 "Export the currently visited mu4e article as HTML."
328 (with-current-buffer mu4e~view-buffer-name
329 (let* ((msg (mu4e-message-at-point))
330 (html (mu4e-message-field msg :body-html))
331 (file (concat "/tmp/" (mu4e-message-field msg :message-id))))
332 (cl-flet* ((mails2str (l)
333 (mapconcat (lambda (m)
334 (format "%S <%s>" (car m) (cdr m)))
335 l ", "))
336 (field2str (f)
337 (let ((value (funcall (cdr f)
338 (mu4e-message-field msg (car f)))))
339 (when value
340 (format "%s: %s
\n"
341 (capitalize (substring (symbol-name (car f)) 1))
342 value)))))
343 (with-temp-buffer
344 (save-excursion
345 (insert html))
346 ;; Remove everything before html tag
347 (save-excursion
348 (when (re-search-forward "^<html\(.?\)>" nil t)
349 (delete-region (point-min) (match-beginning 0))))
350 ;; Insert reply header after body tag
351 (when (re-search-forward "<body\(.?\)>" nil t)
352 (goto-char (match-end 0))
353 (insert "<div align="left">\n"
354 (mapconcat #'field2str
355 `((:from . ,#'mails2str)
356 (:subject . identity)
357 (:to . ,#'mails2str)
358 (:cc . ,#'mails2str)
359 (:date . message-make-date))
360 "")
361 "\n
\n"))
362 (write-file file))
363 (list file)))))
Unless you are trying to answer an non-HTML email but in that case the org-msg-edit-mode
should not even enable itself. Otherwise, we are left with:
- the original email is malformed
- there is a bug in
org-msg-save-article-for-reply-mu4e
or the error management is not strong enough (which is certainly the case but I am not the original author of this function).
If this #2, please share send me the file by email so that I can try to fix this function.
FYI, I use the gnus
backend ⇒ I don't exercise the mu4e
myself but many people around the world are using it.
Regards,
-- Jeremy
One Emacs to rule them all
from org-msg.
Hi,
thanks for the fast response. The original message is generated from a ticket system (Request Tracker).
The mime part with html is this:
------------=_1574156543-7237-6
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8">Ko=
mmentar zu <a href=3D"*snip*">Ti=
cket 34708</a>:<br><br>
*snip* some text with <br> tags
------------=_1574156543-7237-6--
org-msg saves the reply file in /tmp like above - without any
I receive a lot oh html mails from ticket-systems where only a html-part is included - without or tags.
Maybe org-msg does have a workaround for that?
regards
from org-msg.
Hi,
It looks like an invalid html content to me. I don't even see the html or body tag. Also it looks like base64 encorded mime content. The file extracted by mu4e should not have fields like Content-Type:
. It should be the de-encoded html content.
Regards,
Jeremy
from org-msg.
hi,
ah.. I see my mistake. I should it better. The mime part above is from the original mail:
------------=_1574156543-7237-6
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8">Ko=
mmentar zu <a href=3D"*snip*">Ti=
cket 34708</a>:<br><br>
*snip* some text with <br> tags
------------=_1574156543-7237-6--
'org-msg-save-article-for-reply-mu4e' save that to /tmp/messageid :
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8">Kommentar zu <a href=3D"*snip*">Ticket 34708</a>:<br><br>
*snip* some text with <br> tags
Maybe there is any workaround possible? Because that are automated Mails, where I have to reply to :/
Maybe 'org-msg-save-article-for-reply-mu4e' recognize the missing the -tag and insert it?
regards
from org-msg.
Hi Gyhor,
Maybe there is any workaround possible?
Of course, this is possible. I pushed two experimental patches on the experimental branch to handle this situation. Could you test them ? And also review them ?
Regards,
Jeremy
One Emacs to rule them all
from org-msg.
Hi Jeremy,
the firsts tests are positive. Everything is working fine. I will try more the next days.
thank you for your fast response and help!
regards
from org-msg.
Hi Gyhor,
Take your time, try to validate with as many use-cases as possible, we are not in a hurry. Come back to me sometime next week with your feedback. If you do not find any issue, I will push experimental as the new master.
Regards,
Jeremy
from org-msg.
Is it stable enough ?
from org-msg.
I assume that it works now. I have pushed the experimental branch as the new master branch.
from org-msg.
thank you!
from org-msg.
Related Issues (20)
- How to add to different signatures, one for text and one for html HOT 2
- Problems with yanking
- Image from the signature doesn't show on receivers end when I reply to email HOT 8
- Auto indent (vertical lines) on email reply not showing
- Reply and wide reply do not invoke org-msg HOT 1
- Odd Issue with Forwarded Messages, Empty Message at Top
- Tab does not auto-complete emails in the To: field HOT 12
- Wrong cursor position after reply — missing call to `goto-body` HOT 1
- Unwanted *ORG ASCII Export* buffer HOT 5
- Forwarding email with inline image or LaTeX formula fails (reverts to text), but replying works (keeps html) HOT 1
- Customise reply/forward citation lines (currently sometimes shows several authors in From: and duplicate authors in Cc:)
- Temporary reply-to filepaths are not persisted HOT 1
- Proper way to inject css
- Documentation for org-msg-options HOT 1
- `mu` v1.11.23 breaks `org-msg` HOT 3
- inline images in parent message have the wrong content-disposition (attached) when replying HOT 1
- [Feature Request] Addressee tagging generating a mailto link in the message body HOT 2
- How to disable org-msg for org-submit-bug-report?
- `mu 1.12.0` breaks `org-msg` HOT 28
- compose error with mu4e HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from org-msg.