From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/17051 Path: main.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.gnus.general Subject: Re: User interface confusion; p0.30 invokes VM? Date: Sun, 20 Oct 2002 23:17:01 +0000 (UTC) Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035155821 31310 80.91.224.250 (20 Oct 2002 23:17:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:17:01 +0000 (UTC) Return-Path: Original-Received: from gizmo.hpc.uh.edu (gizmo.hpc.uh.edu [129.7.102.31]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id MAA23322 for ; Sun, 13 Sep 1998 12:38:32 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (sina.hpc.uh.edu [129.7.3.5]) by gizmo.hpc.uh.edu (8.7.6/8.7.3) with ESMTP id LAF21738; Sun, 13 Sep 1998 11:09:34 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 13 Sep 1998 11:38:20 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [209.195.19.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id LAA15810 for ; Sun, 13 Sep 1998 11:38:08 -0500 (CDT) Original-Received: from sparky.gnus.org (ppp055.uio.no [129.240.240.56]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id MAA23308 for ; Sun, 13 Sep 1998 12:38:01 -0400 (EDT) Original-Received: (from larsi@localhost) by sparky.gnus.org (8.8.5/8.8.5) id SAA18008; Sun, 13 Sep 1998 18:41:06 +0200 Mail-Copies-To: never X-Now-Reading: Ursula K. Le Guin's _Unlocking the Air and Other Stories_ Original-To: ding@gnus.org In-Reply-To: Karl Kleinpaste's message of "13 Sep 1998 09:48:51 -400" User-Agent: Gnus/5.070031 (Pterodactyl Gnus v0.31) Emacs/20.3 X-Face: &w!^oO~dS|}-P0~ge{$c!h\ writes: > [message/rfc822] [...] > Once I get there, hitting RET on "[message/rfc822]" invokes VM. [Tale of woe elided.] :-) The defaults for many of the parts are, perhaps, less than optimal. Below is the current default; new, improved and spiffy defaults are welcome, as are defaults for new and spiffy things. (Hey! No mp3 or realadio viewer!) I think the format should be self-explanitory, but here's the explanation: `viewer' can be a string (shell process) or a function and `test' is a form that can be executed to see if that viewer can be run. Hm. Wouldn't the following be nice to use? Then you could use `(mailcap-command-p "mpeg_play")' to check for that command, and stuff. (defun mailcap-command-p (command) "Say whether COMMAND is in the exec path." (let ((path exec-path) file) (catch 'found (while path (when (and (file-exists-p (setq file (expand-file-name command (pop path)))) (file-executable-p file)) (throw 'found file)))))) (Ok, so I've rediscovered `goto', and it makes me feel warm an fuzzy.) Feel free to write new and wonderful functions to display weird formats and stuff. Mail your things to this mailing list as you develop it. Here's the current value: '(("application" ("x-x509-ca-cert" (viewer . ssl-view-site-cert) (test . (fboundp 'ssl-view-site-cert)) (type . "application/x-x509-ca-cert")) ("x-x509-user-cert" (viewer . ssl-view-user-cert) (test . (fboundp 'ssl-view-user-cert)) (type . "application/x-x509-user-cert")) ("octet-stream" (viewer . mailcap-save-binary-file) (type ."application/octet-stream")) ("dvi" (viewer . "open %s") (type . "application/dvi") (test . (eq (mm-device-type) 'ns))) ("dvi" (viewer . "xdvi %s") (test . (eq (mm-device-type) 'x)) ("needsx11") (type . "application/dvi")) ("dvi" (viewer . "dvitty %s") (test . (not (getenv "DISPLAY"))) (type . "application/dvi")) ("emacs-lisp" (viewer . mailcap-maybe-eval) (type . "application/emacs-lisp")) ("x-tar" (viewer . mailcap-save-binary-file) (type . "application/x-tar")) ("x-latex" (viewer . tex-mode) (test . (fboundp 'tex-mode)) (type . "application/x-latex")) ("x-tex" (viewer . tex-mode) (test . (fboundp 'tex-mode)) (type . "application/x-tex")) ("latex" (viewer . tex-mode) (test . (fboundp 'tex-mode)) (type . "application/latex")) ("tex" (viewer . tex-mode) (test . (fboundp 'tex-mode)) (type . "application/tex")) ("texinfo" (viewer . texinfo-mode) (test . (fboundp 'texinfo-mode)) (type . "application/tex")) ("zip" (viewer . mailcap-save-binary-file) (type . "application/zip") ("copiousoutput")) ("pdf" (viewer . "acroread %s") (type . "application/pdf")) ("postscript" (viewer . "open %s") (type . "application/postscript") (test . (eq (mm-device-type) 'ns))) ("postscript" (viewer . "ghostview %s") (type . "application/postscript") (test . (eq (mm-device-type) 'x)) ("needsx11")) ("postscript" (viewer . "ps2ascii %s") (type . "application/postscript") (test . (not (getenv "DISPLAY"))) ("copiousoutput"))) ("audio" ("x-mpeg" (viewer . "maplay %s") (type . "audio/x-mpeg")) (".*" (viewer . mm-view-sound-file) (test . (or (featurep 'nas-sound) (featurep 'native-sound))) (type . "audio/*")) (".*" (viewer . "showaudio") (type . "audio/*"))) ("message" ("rfc-*822" (viewer . vm-mode) (test . (fboundp 'vm-mode)) (type . "message/rfc-822")) ("rfc-*822" (viewer . w3-mode) (test . (fboundp 'w3-mode)) (type . "message/rfc-822")) ("rfc-*822" (viewer . view-mode) (test . (fboundp 'view-mode)) (type . "message/rfc-822")) ("rfc-*822" (viewer . fundamental-mode) (type . "message/rfc-822"))) ("image" ("x-xwd" (viewer . "xwud -in %s") (type . "image/x-xwd") ("compose" . "xwd -frame > %s") (test . (eq (mm-device-type) 'x)) ("needsx11")) ("x11-dump" (viewer . "xwud -in %s") (type . "image/x-xwd") ("compose" . "xwd -frame > %s") (test . (eq (mm-device-type) 'x)) ("needsx11")) ("windowdump" (viewer . "xwud -in %s") (type . "image/x-xwd") ("compose" . "xwd -frame > %s") (test . (eq (mm-device-type) 'x)) ("needsx11")) (".*" (viewer . "aopen %s") (type . "image/*") (test . (eq (mm-device-type) 'ns))) (".*" (viewer . "xv -perfect %s") (type . "image/*") (test . (eq (mm-device-type) 'x)) ("needsx11"))) ("text" ("plain" (viewer . w3-mode) (test . (fboundp 'w3-mode)) (type . "text/plain")) ("plain" (viewer . view-mode) (test . (fboundp 'view-mode)) (type . "text/plain")) ("plain" (viewer . fundamental-mode) (type . "text/plain")) ("enriched" (viewer . enriched-decode-region) (test . (fboundp 'enriched-decode-region)) (type . "text/enriched")) ("html" (viewer . mm-w3-prepare-buffer) (test . (fboundp 'w3-prepare-buffer)) (type . "text/html"))) ("video" ("mpeg" (viewer . "mpeg_play %s") (type . "video/mpeg") (test . (eq (mm-device-type) 'x)) ("needsx11"))) ("x-world" ("x-vrml" (viewer . "webspace -remote %s -URL %u") (type . "x-world/x-vrml") ("description" "VRML document"))) ("archive" ("tar" (viewer . tar-mode) (type . "archive/tar") (test . (fboundp 'tar-mode))))) -- (domestic pets only, the antidote for overdose, milk.) larsi@gnus.org * Lars Magne Ingebrigtsen