From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/28596 Path: main.gmane.org!not-for-mail From: Kim-Minh Kaplan Newsgroups: gmane.emacs.gnus.general Subject: [PATCH] to mm-decode.el please someone put it in CVS. Date: 06 Jan 2000 00:08:58 +0100 Organization: Gnus Information Center Sender: owner-ding@hpc.uh.edu Message-ID: <87k8lo5d6d.fsf@kloug.western.fr> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035165417 30688 80.91.224.250 (21 Oct 2002 01:56:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:56:57 +0000 (UTC) Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by mailhost.sclp.com (Postfix) with ESMTP id 53280D051E for ; Wed, 5 Jan 2000 18:10:57 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id RAB15862; Wed, 5 Jan 2000 17:10:43 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 05 Jan 2000 17:10:46 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id RAA15457 for ; Wed, 5 Jan 2000 17:10:34 -0600 (CST) Original-Received: from quimby.gnus.org (quimby.gnus.org [193.69.4.139]) by mailhost.sclp.com (Postfix) with ESMTP id ADF4ED051E for ; Wed, 5 Jan 2000 18:08:59 -0500 (EST) Original-Received: (from news@localhost) by quimby.gnus.org (8.9.3/8.9.3) id AAA27808 for ding@gnus.org; Thu, 6 Jan 2000 00:11:03 +0100 (CET) Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 41 Original-NNTP-Posting-Host: ext0.western.fr Original-X-Trace: quimby.gnus.org 947113863 4820 195.101.52.192 (5 Jan 2000 23:11:03 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 5 Jan 2000 23:11:03 GMT Mail-Copies-To: poster X-Face: C!5Mk_!qB]35}VpD|H>GN/@fk%~7:*/x8&~\]|r|)/zV?rJ){uX4Nh`a$L/z__Kx4Gt!mDU 3kZlj)F2]Ds$?l';SO9]v^|[i2nY`pZ+mu+HT%5ITkuP#e]@8F4@Hc.=]oN1+d\M@Rl>-$C?h$yntf -JVx)3L2}VzG.!bQEy]~I_3fup`HtZ^t/Iz.|Vh$~o`^g\ User-Agent: Gnus/5.0804 (Gnus v5.8.4) XEmacs/20.4 (Emerald) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:28596 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:28596 Can someone put this in the repository please ? Kim-Minh. 2000-01-06 00:06:40 Kim-Minh Kaplan * mm-decode.el (mm-mailcap-command): handle "%%" and the case where there is no "%s" in the method. --- mm-decode.el 2000/01/05 16:01:17 5.69 +++ mm-decode.el 2000/01/05 23:06:39 @@ -433,20 +433,28 @@ (defun mm-mailcap-command (method file type-list) (let ((ctl (cdr type-list)) (beg 0) + (uses-stdin t) out sub total) - (while (string-match "%{\\([^}]+\\)}\\|%s\\|%t" method beg) + (while (string-match "%{\\([^}]+\\)}\\|%s\\|%t\\|%%" method beg) (push (substring method beg (match-beginning 0)) out) (setq beg (match-end 0) total (match-string 0 method) sub (match-string 1 method)) (cond + ((string= total "%%") + (push "%" out)) ((string= total "%s") + (setq uses-stdin nil) (push (mm-quote-arg file) out)) ((string= total "%t") (push (mm-quote-arg (car type-list)) out)) (t (push (mm-quote-arg (or (cdr (assq (intern sub) ctl)) "")) out)))) (push (substring method beg (length method)) out) + (if uses-stdin + (progn + (push "<" out) + (push (mm-quote-arg file) out))) (mapconcat 'identity (nreverse out) ""))) (defun mm-remove-parts (handles)