From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/28612 Path: main.gmane.org!not-for-mail From: John S Cooper Newsgroups: gmane.emacs.gnus.general Subject: start'ing attachments under Windows Date: 06 Jan 2000 16:54:57 +0000 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035165430 30773 80.91.224.250 (21 Oct 2002 01:57:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:57:10 +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 50726D051F for ; Thu, 6 Jan 2000 11:51:26 -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 KAB17439; Thu, 6 Jan 2000 10:51:11 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 06 Jan 2000 10:51:13 -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 KAA25936 for ; Thu, 6 Jan 2000 10:51:03 -0600 (CST) Original-Received: from gatekeeper.ctxuk.citrix.com (gatekeeper.ctxuk.citrix.com [195.153.38.114]) by mailhost.sclp.com (Postfix) with ESMTP id CE5B7D051F for ; Thu, 6 Jan 2000 11:49:27 -0500 (EST) Original-Received: from sh.ctxuk.citrix.com (sh.ctxuk.citrix.com [10.30.224.4]) by gatekeeper.ctxuk.citrix.com (8.8.7/BSCF-1.7) with ESMTP id QAA03359 for ; Thu, 6 Jan 2000 16:49:26 GMT Original-Received: from hwav01.ctxuk.citrix.com (hwav01.ctxuk.citrix.com [10.30.224.26]) by sh.ctxuk.citrix.com (8.8.7/BSCF-1.7) with SMTP id QAA10129 for ; Thu, 6 Jan 2000 16:49:25 GMT Original-Received: from 10.30.224.23 by hwav01.ctxuk.citrix.com (InterScan E-Mail VirusWall NT); Thu, 06 Jan 2000 16:49:25 -0000 (GMT Standard Time) Original-Received: from KONTIKI.cam.citrix.com (KONTIKI [10.70.1.17]) by hwmail01.ctxuk.citrix.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id CNFYLYLD; Thu, 6 Jan 2000 16:49:25 -0000 Original-To: ding@gnus.org Original-Lines: 73 User-Agent: Gnus/5.070099 (Pterodactyl Gnus v0.99) Emacs/20.5 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:28612 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:28612 In the Windows world, it can be useful to have attachments launched via the `start' command, e.g., in my .mailcap file: application/msword; start %s application/msexcel; start %s application/vnd.ms-excel; start %s application/octet-stream; start %s However, the start command doesn't seem to grok files that contain spaces (I tried various quoting), and unfortunately many Windows-originating attachments I receive are given names containing spaces. To address this I've made the appended modification to mm-decode.el which will replace spaces with underscores in the filenames associated with attachments (both for temporary files and attachments explicity saved by typing `o' on the MIME button). Could this be added to the distribution? (mm-filename-space-char would need to be a `defvar', and probably renamed, for real use.) In my .emacs: (setq mm-filename-space-char ?-) --- John $ diff -c mm-decode.el.sav mm-decode.el *** mm-decode.el.sav Fri Dec 17 13:12:06 1999 --- mm-decode.el Fri Dec 17 13:15:07 1999 *************** *** 355,362 **** (make-directory dir) (set-file-modes dir 448) (if filename ! (setq file (expand-file-name (file-name-nondirectory filename) ! dir)) (setq file (make-temp-name (expand-file-name "mm." dir)))) (let ((coding-system-for-write mm-binary-coding-system)) (write-region (point-min) (point-max) file nil 'nomesg)) --- 355,366 ---- (make-directory dir) (set-file-modes dir 448) (if filename ! (progn ! (and mm-filename-space-char ! (while (string-match " " filename) ! (setq filename (replace-match (char-to-string mm-filename-space-char) nil nil filename)))) ! (setq file (expand-file-name (file-name-nondirectory filename) ! dir))) (setq file (make-temp-name (expand-file-name "mm." dir)))) (let ((coding-system-for-write mm-binary-coding-system)) (write-region (point-min) (point-max) file nil 'nomesg)) *************** *** 597,603 **** (mm-handle-disposition handle) 'filename)) file) (when filename ! (setq filename (file-name-nondirectory filename))) (setq file (read-file-name "Save MIME part to: " (expand-file-name --- 601,611 ---- (mm-handle-disposition handle) 'filename)) file) (when filename ! (setq filename (file-name-nondirectory filename)) ! (and mm-filename-space-char ! (while (string-match " " filename) ! (setq filename (replace-match (char-to-string mm-filename-space-char) nil nil filename))))) ! (setq file (read-file-name "Save MIME part to: " (expand-file-name $