在执行mu4e功能期间禁用openwith

时间:2014-04-08 16:22:59

标签: emacs elisp

您好我正在使用openwith打开pdf中的okular个文件,相关的行是

(require 'openwith) ;open files with external program                                                                                                                                                                            

(setq openwith-associations '(("\\.pdf\\'" "okular" (file)))) ;use okular for pdf                                                                                                                                                
(openwith-mode t)

当我想发送包含mu4e的邮件时,如果附加了pdf,而不是完成功能message-send-and-exitpdf会在{{{}}中打开1}}并且永远不会发送消息。

我正在考虑添加类似的挂钩

okular

但我不是(add-hook 'message-send-and-exit (openwith-mode nil)) 专家,但这并没有解决问题,可能是我做错了什么,有人可以给我一个提示吗?

1 个答案:

答案 0 :(得分:2)

Openwith会干扰附件。由于mu4e重新使用message模式,您可以执行以下操作以避免冲突:

;; prevent <openwith> from interfering with mail attachments
(require 'mm-util)
(add-to-list 'mm-inhibit-file-name-handlers 'openwith-file-handler)