Package: semi Version: 1.14.6+0.20100219-1 Severity: wishlist In some situations, it is desirable to invoke an arbitrary command when 'play' of a mime entity is complete. For example, if a program has text/calendar information, the default mailcap entry is for 'itip'. When 'v' is used to 'play' the text/calendar content, the itip output gets dumped into a *MIME-echo* buffer (which, by default, remains buried). I find it convenient to have the content of that buffer automatically shown when the external program completes. Presently, I use a modified version of MIME-MAILCAP-METHOD-SENTINEL to facilitate this:
(defvar mime-play-external-program-done-hook nil) ; replace w/defcustom? (defun switch-to-process-buffer (process) (switch-to-buffer (process-buffer process))) (add-hook 'mime-play-external-program-done-hook 'switch-to-process-buffer) (defun mime-mailcap-method-sentinel (process event) (when mime-play-delete-file-immediately (let ((file (cdr (assq process mime-mailcap-method-filename-alist)))) (when (file-exists-p file) (ignore-errors (delete-file file) (delete-directory (file-name-directory file))))) (remove-alist 'mime-mailcap-method-filename-alist process)) (run-hook-with-args 'mime-play-external-program-done-hook process) ; add hook (message "%s %s" process event)) -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org