chenyanming / shrface

Extend eww/nov with org-mode features, archive web pages to org files with shr.
GNU General Public License v3.0
215 stars 14 forks source link

mu4e html emails still look pretty bad, not sure if working? #3

Open ghost opened 4 years ago

ghost commented 4 years ago

I use doom emacs, I added the following line to ~/.doom.d/packages.el.

(package! shrface :recipe (:host github :repo "chenyanming/shrface"))

Then I ran doom sync, restarted emacs. I see no visual change to my html based emails.

2020-04-11_13-13

chenyanming commented 4 years ago

I use doom emacs, I added the following line to ~/.doom.d/packages.el.

(package! shrface :recipe (:host github :repo "chenyanming/shrface"))

Then I ran doom sync, restarted emacs. I see no visual change to my html based emails.

2020-04-11_13-13

@gregf I think it is probably your HTML email may not have headings (actually not all html emails are well formated). At this moment, the package just simply customizes the <h1> to <h6>, <href> tags etc of html files to make them render like the org files (thinking about the CSS file usage). You can add the following codes into your mu4e setting to test:

(defun jcs-view-in-eww (msg)
  (eww-browse-url (concat "file://" (mu4e~write-body-to-html msg))))
(add-to-list 'mu4e-view-actions '("Eww view" . jcs-view-in-eww) t)
  1. In the mu4e-view-mode(just like the image you attach), press a, then E to open the mail with EWW.
  2. M-x eww-view-source.
  3. Search <h1> for example. If no <h1> tag, shrface-h1-face would not work.
ghost commented 4 years ago

@chenyanming A few things here.

  1. Viewing the email in eww-view-source drastically improves the output of the email for some reason?
  2. It's a bunch of tables and divs.
chenyanming commented 4 years ago

@chenyanming A few things here.

  1. Viewing the email in eww-view-source drastically improves the output of the email for some reason?
  2. It's a bunch of tables and divs.

@gregf

For tables, I am planning to work on it. Format the table like org table, but it needs a lot of work. Will not be available at a short time.

ghost commented 4 years ago

@chenyanming Thank you! <3

chenyanming commented 4 years ago

@chenyanming A few things here.

  1. Viewing the email in eww-view-source drastically improves the output of the email for some reason?
  2. It's a bunch of tables and divs.

@gregf Regarding to your first question, it is because mu4e use shr render to format the local html files. Some resources would not be shown (such as images), since they are needed to download from the internet. Therefore, using eww to see the mail can show the online elements.