Open ghost opened 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.
@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)
mu4e-view-mode
(just like the image you attach), press a
, then E
to open the mail with EWW. M-x
eww-view-source
. <h1>
for example. If no <h1>
tag, shrface-h1-face
would not work.@chenyanming A few things here.
@chenyanming A few things here.
- Viewing the email in eww-view-source drastically improves the output of the email for some reason?
- 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.
@chenyanming Thank you! <3
@chenyanming A few things here.
- Viewing the email in eww-view-source drastically improves the output of the email for some reason?
- 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.
I use doom emacs, I added the following line to ~/.doom.d/packages.el.
Then I ran doom sync, restarted emacs. I see no visual change to my html based emails.