(defvar my-mime-preview-play-current-entity-appname "fiber" "meadow なら fiber, mac なら open, linux なら xdg-open") (unless (functionp #'mime-preview-play-current-entity-orig) (fset #'mime-preview-play-current-entity-orig (symbol-function #'mime-preview-play-current-entity))) (setq mime-play-delete-file-immediately nil) (defun mime-preview-play-current-entity (&optional ignore-examples mode) (interactive "P") (if (and mode (not (equal mode "play"))) (mime-preview-play-current-entity-orig ignore-examples mode) (let* ((entity (get-text-property (point) 'mime-view-entity)) (name (mime-entity-safe-filename entity)) (filename (expand-file-name (if (and name (not (string= name ""))) name (make-temp-name "EMI")) (make-temp-file "EMI" 'directory)))) (mime-write-entity-content entity filename) (message "External method is starting...") (let* ((process-name (concat my-mime-preview-play-current-entity-appname " " filename)) (process (start-process process-name mime-echo-buffer-name my-mime-preview-play-current-entity-appname filename))) (set-alist 'mime-mailcap-method-filename-alist process filename) (set-process-sentinel process 'mime-mailcap-method-sentinel)))))参考>> 俺 wanderlust。さっき mailcap と別れてきた
Emacs wanderlust mailcapを参照せずに添付ファイルを開く(fiber.exe利用)
Tweet
これはすごい便利。以下をdot.emacsかdot.wlに記載しておけば、添付ファイルにカーソルを合わせてvでアプリが起動してくる。
登録:
コメントの投稿 (Atom)
0 件のコメント:
コメントを投稿