在emacs中使用mew接收mime的邮件,打开附件时,
mew-win32.el会指定打开程序默认程序
网上没有找到这个程序。
mew-win32.el
(defvar mew-w32-exec ")
改为
(defvar mew-w32-exec ")
然后把mew-mine.el:
函数mew-summary-execute-program
修改
(require 'dired) ;;增加引用文件
;;; external
(defun mew-summary-execute-program (program ct ctl cache begin end params fname options async)
(if (not (mew-which-exec program))
(message "%s does not exist" program)
(let ((file (mew-make-temp-name fname))
wcs)
(save-excursion
(set-buffer cache)
;; NEVER use call-process-region for privacy reasons
(cond
((not (mew-ct-linebasep ct))
(setq wcs mew-cs-binary))
((not (mew-ct-textp ct))
(setq wcs mew-cs-text-for-write))
(t
(cond
((or (string= mew-ct-htm ct) (string= mew-ct-xml ct))
(setq wcs (mew-text/html-detect-cs begin end))
(unless (mew-coding-system-p wcs)
(setq wcs (mew-charset-to-cs
(mew-syntax-get-param ctl "charset")))))
(t
(setq wcs (mew-charset-to-cs
(mew-syntax-get-param ctl "charset")))))
(unless (mew-coding-system-p wcs)
(setq wcs (if mew-decode-broken
(mew-charset-to-cs
(mew-charset-guess-region
begin end))
mew-cs-text-for-write)))))
(mew-frwlet mew-cs-dummy wcs
(write-region begin end file nil 'no-msg))
(if async
(mew-mime-start-process program options (dired-replace-in-string "/" "//" file) );yxf
(mew-mime-call-process program options (dired-replace-in-string "/" "//" file) ))))));把路径中/改为"/",以便explorer识别。
本文发布于:2024-01-29 08:54:49,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170648969214136.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |