From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/24042 Path: main.gmane.org!not-for-mail From: wmperry@aventail.com (William M. Perry) Newsgroups: gmane.emacs.gnus.general Subject: Re: %{...} in mailcap (was: bugs in mailcap (patch: 93-zsh3)) Date: 09 Jul 1999 11:47:08 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: <86emihwz1v.fsf@kramer.bp.aventail.com> References: <2nhfnfwrsz.fsf@tiger.jia.vnet> <2naet5lrr5.fsf@tiger.jia.vnet> Reply-To: wmperry@aventail.com NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035161678 6567 80.91.224.250 (21 Oct 2002 00:54:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 00:54:38 +0000 (UTC) Cc: Gnus Mailing List Return-Path: Original-Received: from farabi.math.uh.edu (farabi.math.uh.edu [129.7.128.57]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id MAA21773 for ; Fri, 9 Jul 1999 12:49:06 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by farabi.math.uh.edu (8.9.1/8.9.1) with ESMTP id LAB21225; Fri, 9 Jul 1999 11:49:00 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 09 Jul 1999 11:49:50 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id LAA12757 for ; Fri, 9 Jul 1999 11:49:40 -0500 (CDT) Original-Received: from newman.aventail.com (root@newman.aventail.com [216.207.80.1]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id MAA21758 for ; Fri, 9 Jul 1999 12:48:32 -0400 (EDT) Original-Received: from kramer.bp.aventail.com (wmperry@usrpri2-58.kiva.net [206.97.75.123]) by newman.aventail.com (8.8.5/8.8.5) with ESMTP id JAA00837; Fri, 9 Jul 1999 09:47:11 -0700 (PDT) Original-Received: (from wmperry@localhost) by kramer.bp.aventail.com (8.9.3/8.9.3) id LAA04342; Fri, 9 Jul 1999 11:47:08 -0500 Original-To: Shenghuo ZHU X-Face: O~Rn;(l][/-o1sALg4A@xpE:9-"'IR[%;,,!m7 writes: > >>>>> "LMI" == Lars Magne Ingebrigtsen writes: > > >> Here the patch. By the way, I guess mm-display-external do not handle > >> %-sequences like %{name}, %{patchnumber}. > > LMI> No, it doesn't -- I didn't even know that one could do that. Is the > LMI> mailcap format specified anywhere? > > The following is cited from mailcap manual of RedHat 6.0 (by Nathaniel > S. Borenstein). The original mm.el code handles this type of thing in 'mm-unescape-mime-test' but I don't think it did it when actually passing things to the viewers. (cond ((null save-chr) nil) ((= save-chr ?t) (delete-region save-pos (progn (forward-char 1) (point))) (insert (or (cdr (assoc "type" type-info)) "\"\""))) ((= save-chr ?M) (delete-region save-pos (progn (forward-char 1) (point))) (insert "\"\"")) ((= save-chr ?n) (delete-region save-pos (progn (forward-char 1) (point))) (insert "\"\"")) ((= save-chr ?F) (delete-region save-pos (progn (forward-char 1) (point))) (insert "\"\"")) >>>> ((= save-chr ?{) >>>> (forward-char 1) >>>> (skip-chars-forward "^}") >>>> (downcase-region (+ 2 save-pos) (point)) >>>> (setq subst (buffer-substring (+ 2 save-pos) (point))) >>>> (delete-region save-pos (1+ (point))) >>>> (insert (or (cdr (assoc subst type-info)) "\"\""))) (t nil)) -bp