0
我想在mu4e中以pdf函數的形式工作,我猜測問題是可執行文件的查找目錄msg2pdf
。 從函數定義我看到mu4e如何更改查找目錄來自mu4e-action-view-as-pdf功能
(defvar mu4e-msg2pdf "/usr/bin/msg2pdf" "Path to the msg2pdf toy.")
(defun mu4e-action-view-as-pdf (msg)
"Convert the message to pdf, then show it.
Works for the message view."
(unless (file-executable-p mu4e-msg2pdf)
(mu4e-error "msg2pdf not found; please set `mu4e-msg2pdf'"))
(let* ((pdf
(shell-command-to-string
(concat mu4e-msg2pdf " "
(shell-quote-argument (mu4e-message-field msg :path))
" 2> /dev/null")))
(pdf (and pdf (> (length pdf) 5)
(substring pdf 0 -1)))) ;; chop \n
(unless (and pdf (file-exists-p pdf))
(mu4e-warn "Failed to create PDF file"))
(find-file pdf)))
,我改變了(defvar mu4e-msg2pdf "/usr/bin/msg2pdf" "Path to the msg2pdf toy.")
其中msg2pdf
是相匹配的路徑。 的問題是,從調試器我看到
Debugger entered--returning value: nil
file-executable-p("/build/buildd/maildir-utils-0.9.9.5/toys/msg2pdf/msg2pdf")
* #[(msg) "\305!\204\n ......
* mu4e-action-view-as-pdf((.....
mu4e-view-action()
call-interactively(mu4e-view-action nil nil)
的查找路徑是不是我指定的。由於我試圖用不同的方式修改它,顯然mu4e
忽略了我,有沒有人知道我該如何設置正確的查找路徑?