* make the msg2pdf action a bit more robust
This commit is contained in:
@ -52,9 +52,12 @@ view."
|
|||||||
(let* ((pdf
|
(let* ((pdf
|
||||||
(shell-command-to-string
|
(shell-command-to-string
|
||||||
(concat mu4e-msg2pdf " "
|
(concat mu4e-msg2pdf " "
|
||||||
(shell-quote-argument (plist-get msg :path)))))
|
(shell-quote-argument (mu4e-msg-field msg :path))
|
||||||
(pdf (and pdf (substring pdf 0 -1)))) ;; chop \n
|
" 2> /dev/null")))
|
||||||
(unless (file-exists-p pdf)
|
(pdf (and pdf (> (length pdf) 5)
|
||||||
|
(substring pdf 0 -1)))) ;; chop \n
|
||||||
|
(unless (and pdf (file-exists-p pdf))
|
||||||
|
(message "==> %S %S" pdf (mu4e-msg-field msg :path))
|
||||||
(error "Failed to create PDF file"))
|
(error "Failed to create PDF file"))
|
||||||
(find-file pdf)))
|
(find-file pdf)))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user