From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68687 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Simple "view this image externally" question Date: Fri, 10 Jul 2009 08:35:28 +0900 Organization: Emacsen advocacy group Message-ID: References: <87k52ho9fz.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1247182592 15928 80.91.229.12 (9 Jul 2009 23:36:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Jul 2009 23:36:32 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M17114@lists.math.uh.edu Fri Jul 10 01:36:25 2009 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1MP3A9-000814-6f for ding-account@gmane.org; Fri, 10 Jul 2009 01:36:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1MP39x-00018U-Ks; Thu, 09 Jul 2009 18:36:13 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1MP39v-00018D-Q4 for ding@lists.math.uh.edu; Thu, 09 Jul 2009 18:36:11 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1MP39u-0004iC-FR for ding@lists.math.uh.edu; Thu, 09 Jul 2009 18:36:11 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1MP3AR-0005Qj-00 for ; Fri, 10 Jul 2009 01:36:43 +0200 Original-Received: from localhost ([127.0.0.1]:46274) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1MP39I-0001bb-C1 for ding@gnus.org; Thu, 09 Jul 2009 18:35:32 -0500 X-Hashcash: 1:20:090709:ding@gnus.org::F+yea+iZE57in6EH:00003VZg X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:Jydxw8Y3ARrizQIc7bMIGq9aZDI= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68687 Archived-At: >>>>> Paul R wrote: > I can't display externally any image when the name contains space. > I haven't investigated much but I suspect the default viewer ("display", > from image-magick) to be run without quoting the temp file name nor > escaping spaces. I had a quick look at gnus and multimedia customization > but I did not find any variable that could fix that. > As an interesting data point, dired does not suffer from this problem > when using dired-display-image-externaly (or so...). > Could some kind and knowlegable soul do something about that please ? I don't know what `dired-display-image-externaly' is, but one possibility is that the program Gnus uses to display images is a shell script. Is it the real "display" executable? To verify it, try evaluating the following forms (for example): (mailcap-mime-info "image/png") => "display %s" (executable-find "display") => "/usr/local/bin/display" And examine the type of the program: % file /usr/local/bin/display => /usr/local/bin/display: ELF 32-bit LSB executable,... Gnus should quote space as follows: (mm-mailcap-command "display %s" "file name.png" '("image/png" (name . "file name.png"))) => "display file\\ name.png" However, if "display" is a shell script, the quotes in the file name likely get disappeared when the shell script passes it to the real command. Maybe one solution is to make the ~/.mailcap file have the entry like: image/*; /usr/local/bin/display %s To reflect it immediately, use `M-x mailcap-parse-mailcaps RET'.