Giter Site home page Giter Site logo

Comments (8)

jeremy-compostella avatar jeremy-compostella commented on May 20, 2024 1

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on May 20, 2024

Have you got a chance to give a try to mu4e~write-body-to-html ?

from org-msg.

jsravn avatar jsravn commented on May 20, 2024

@jeremy-compostella I tried, however it breaks in org-msg-improve-reply-header and org-msg-html-buffer-to-xml that parses the html. I'm guessing these functions will need to be adjusted.

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on May 20, 2024

Could you share with me an example HTML file that fails in org-msg-improve-reply-header and org-msg-html-buffer-to-xml ?

from org-msg.

jsravn avatar jsravn commented on May 20, 2024

Could you share with me an example HTML file that fails in org-msg-improve-reply-header and org-msg-html-buffer-to-xml ?

Here's the error

Debugger entered--Lisp error: (wrong-type-argument consp nil)
  org-msg-improve-reply-header((html nil (head nil (meta ((charset . "UTF-8")))) (body nil (p nil (strong nil "From") ": GitHub <[email protected]>" (strong nil "To") ": jsravn-test <[email protected]>" (strong nil "Date") ": Thu 07 May 2020 11:54:22 BST" (strong nil "Subject") ": [GitHub] Welcome to GitHub, @jsravn-...") "\15\n\15\n  \15\n    " (meta ((http-equiv . "content-type") (content . "text/html; charset=utf-8"))) (title nil "Welcome to GitHub!") (style ((type . "text/css")) "\15\n\11\11#outlook a{\15\n\11\11\11padding:0;\15\n\11\11}\15\n\11...") (table ((class . "body") (style . "border-spacing:0;border-collapse:colla...")) (tr (...) (td ... "\15\n          " ... "\15\n        ") "\15\n      ")) (comment nil "/.body"))) ((del nil ((font-family . "\"Arial\"") (font-size . "10pt") (color . "grey") (border-left . "none") (text-decoration . "line-through") (margin-bottom . "0px") (margin-top . "10px") (line-height . "11pt"))) (a nil ((color . "#0071c5"))) (a reply-header ((color . "black") (text-decoration . "none"))) (div reply-header ((padding . "3.0pt 0in 0in 0in") (border-top . "solid #e1e1e1 1.0pt") (margin-bottom . "20px"))) (span underline ((text-decoration . "underline"))) (li nil ((font-family . "\"Arial\"") (font-size . "10pt") (line-height . "10pt") (margin-bottom . "0px") (margin-top . "2px"))) (nil org-ul ((list-style-type . "square"))) (nil org-ol ((font-family . "\"Arial\"") (font-size . "10pt") (line-height . "10pt") (margin-bottom . "0px") (margin-top . "0px") (margin-left . "30px") (padding-top . "0px") (padding-left . "5px"))) (nil signature ((font-family . "\"Arial\"") (font-size . "10pt") (margin-bottom . "20px"))) (blockquote nil ((padding-left . "5px") (margin-left . "10px") (margin-top . "20px") (margin-bottom . "0") (border-left . "3px solid #ccc") (font-style . "italic") (background . "#f9f9f9"))) (code nil ((font-size . "10pt") (font-family . "monospace") (background . "#f9f9f9"))) (code src\ src-asl ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-c ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-c++ ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-conf ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-cpp ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-csv ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-diff ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-ditaa ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-emacs-lisp ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-fundamental ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-ini ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-json ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-makefile ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-man ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-org ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-plantuml ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-python ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-sh ((color . "#bbc2cf") (background-color . "#21242b"))) (code src\ src-xml ((color . "#bbc2cf") (background-color . "#21242b"))) (nil linenr ((padding-right . "1em") (color . "black") (background-color . "#aaaaaa"))) (pre nil ((line-height . "12pt") (color . "#bbc2cf") (background-color . "#21242b") (margin . "0px") (font-size . "9pt") (font-family . "monospace"))) (div org-src-container ((margin-top . "10px"))) (nil figure-number ((font-family . "\"Arial\"") (font-size . "10pt") (color . "#0071c5") (font-weight . "bold") (text-align . "left"))) (nil table-number) (caption nil ((text-align . "left") (background . "#0071c5") (color . "white") (font-weight . "bold"))) (nil t-above ((caption-side . "top"))) (nil t-bottom ((caption-side . "bottom"))) ...))
  org-msg-build()
  org-msg-prepare-to-send()
  run-hooks(message-send-hook)
  message-send(nil)
  message-send-and-exit()
  org-msg-ctrl-c-ctrl-c()
  run-hook-with-args-until-success(org-msg-ctrl-c-ctrl-c)
  org-ctrl-c-ctrl-c(nil)
  funcall-interactively(org-ctrl-c-ctrl-c nil)
  call-interactively(org-ctrl-c-ctrl-c nil nil)
  command-execute(org-ctrl-c-ctrl-c)

And example HTML written with mu4e~write-body-to-html: https://gist.github.com/jsravn/b4c07878de8cc85a1172bbae052e1121.

The built in mu4e function is actually working pretty well apart from this I think. We should probably just skip the improve reply header for mu4e - the mu4e one looks pretty good already.

from org-msg.

jsravn avatar jsravn commented on May 20, 2024

Hmm, maybe not - disabling org-msg-improve-reply-header produces (with my reply here at the top):

image

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on May 20, 2024

Hmm it looks like I closed by mistake as I still have this item in my TODO list => re-opening.

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on May 20, 2024

The first problem is that the mu4e~write-body-to-html creates an invalid HTML file with data preceding the root html tag. So I would suggest to make this function create a valid HTML file first.

<head><meta charset="UTF-8"></head>
<p><strong>From</strong>: GitHub &lt;[email protected]&gt;</br><strong>To</strong>: jsravn-test &lt;[email protected]&gt;</br><strong>Date</strong>: Thu 07 May 2020 11:54:22 BST</br><strong>Subject</strong>: [GitHub] Welcome to GitHub, @jsravn-test!</p><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">

Once this is done, then the fix would be to look for what has been added and put it a div section.

Regards,
Jeremy

from org-msg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.