Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: Re: Simple "view this image externally" question
Date: Fri, 10 Jul 2009 08:35:28 +0900	[thread overview]
Message-ID: <b4mzlbdig5b.fsf@jpl.org> (raw)
In-Reply-To: <87k52ho9fz.fsf@gmail.com>

>>>>> 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'.



  reply	other threads:[~2009-07-09 23:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-09 21:03 Paul R
2009-07-09 23:35 ` Katsumi Yamaoka [this message]
2009-07-10 19:40   ` Ted Zlatanov
2009-07-13  1:16     ` Katsumi Yamaoka
2009-07-13  9:40   ` Paul R

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4mzlbdig5b.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).