I try to convert to pdf with this following code found on Emacs SE:
(defun mu4e-action-save-to-pdf (msg) (let* ((date (mu4e-message-field msg :date)) (infile (mu4e~write-body-to-html msg)) (outfile (format-time-string "%Y-%m-%d%H%M%S.pdf" date))) (with-temp-buffer (shell-command (format "wkhtmltopdf %s ~/Desktop/%s" infile outfile) t)))) (add-to-list 'mu4e-view-actions '("Save to PDF" . mu4e-action-save-to-pdf) t) But when I launch the action it says:
void function mu4e-write-body-to-html
When I M-x mu4e-write<TAB> nothing exists. Can someone tell me how to fix that?
mu4e~write-body-to-htmlis defined inmu4e-view-old.el[c]and seems to be outdated. Note the tilde~in the name, which is a non-standard convention for names in Emacs. You can tryM-x load-library RET mu4e-view-oldto load the library (assuming it's in yourload-path): that should resolve the error message you get, but whether that will actually work... I don't know but I somehow doubt it.mu4ethan I do (which is not hard, since I know almost nothing about it). [I'm not sure whether the at-reference will work btw, but I thought it's worth trying]mu4e.elI think. DidM-x load-library RET mu4e-view-oldnot work?