Article View: gnu.emacs.vm.bug
Article #686Re: Can't launch attachments with "spaces" in file name
From: Kevin Rodgers
Date: Mon, 12 Jan 2004 22:33
Date: Mon, 12 Jan 2004 22:33
36 lines
2162 bytes
2162 bytes
Jeffrey J. Kosowsky wrote:
> I am really enjoying the ability added in VM-7.18 that launches
> attachments under their actual file name as opposed to just using a
> random temp file name.
>
> However, I have noticed that files with spaces in them fail to launch
> properly, though the file itself is detached to the temp directory under the
> proper full file name.
>
> I imagine that this is probably due to file names not being properly
> quoted to preserve spaces and other such non-alphanumeric characters.
>
> Any thoughts where source of error is and how to fix?
Such file names should only cause a problem if the external program is launched
via the shell. Does this patch to vm-mime-display-external-generic help?
*** vm-7.18/vm-mime.el.orig Mon Oct 13 13:30:18 2003
--- vm-7.18/vm-mime.el Mon Jan 12 15:29:13 2004
***************
*** 2003,2008 ****
--- 2003,2012 ----
(write-region start end tempfile nil 0)
(delete-region start end))))
+ ;; quote file name for shell command only
+ (or (cdr program-list)
+ (setq tempfile (shell-quote-argument tempfile)))
+
;; expand % specs
(let ((p program-list)
(vm-mf-attachment-file tempfile))
--
Kevin Rodgers
Technical Details
Message-ID:
<400320B7.5060408@yahoo.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!170.207.51.80!not-for-mailReferences:
<m2fzekj10g.fsf@consult.pretender>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f6829,6e83a1235cadfbbe X-Google-Attributes: gidf6829,public X-Google-ArrivalTime: 2004-01-12 14:33:32 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!170.207.51.80!not-for-mail From: Kevin Rodgers <ihs_4664@yahoo.com> Newsgroups: gnu.emacs.vm.bug Subject: Re: Can't launch attachments with "spaces" in file name Date: Mon, 12 Jan 2004 15:33:27 -0700 Lines: 37 Message-ID: <400320B7.5060408@yahoo.com> References: <m2fzekj10g.fsf@consult.pretender> NNTP-Posting-Host: 170.207.51.80 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1073946811 12576584 170.207.51.80 ([82742]) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us