Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
edited tags
Link
NickD
  • 36.1k
  • 4
  • 33
  • 50
added 63 characters in body
Source Link
NickD
  • 36.1k
  • 4
  • 33
  • 50

I try to convert to pdf with this following code found on the web ..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) 
(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"M-x mu4e-write<TAB> nothing exists ?. Can somonesomeone tell me how to fix that. Thk?

I try to convert to pdf with this following code found on the web ..

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" nothing exists ? Can somone tell me how to fix that. Thk

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?

Source Link
mcp
  • 67
  • 3

mu4e how to convert msg to pdf?

I try to convert to pdf with this following code found on the web ..

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" nothing exists ? Can somone tell me how to fix that. Thk