From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: Re: mailcap-parse-mailcaps does regexp-quote MIME types
Date: Fri, 26 Aug 2011 18:02:00 +0900 [thread overview]
Message-ID: <b4msjoolf5j.fsf@jpl.org> (raw)
In-Reply-To: <b4mliukz9uv.fsf@jpl.org>
Katsumi Yamaoka wrote:
> I have this entry in my ~/.mailcap file:
> application/vnd.ms-powerpoint; /cygdrive/c/Program\ Files/Microsoft\ Office/Office12/POWERPNT.EXE "`cygpath --windows %s`"
> `mailcap-parse-mailcaps' parses it and makes an entry in
> `mailcap-mime-data' as:
> (("application"
> ("vnd\\.ms-powerpoint"
> (viewer . "/cygdrive/c/Program\\ Files/Microsoft\\ Office/Office12/POWERPNT.EXE \"`cygpath --windows %s`\"")
> (type . "application/vnd\\.ms-powerpoint"))
> ))
> Note that the MIME type is regexp-quote'd. Because of this POWERPNT
> doesn't run automatically when playing such parts.
I was confused for something or half asleep. Now Gnus plays ppt
attachments automatically with no mailcap.el modification. Sorry
for the noise.
> May I install
> the patch attached below? Otherwise is there any deep reason r-q
> is indispensable?
> --- mailcap.el~ 2011-04-05 05:00:09.725625000 +0000
> +++ mailcap.el 2011-08-23 10:41:18.265625000 +0000
> @@ -472,3 +472,3 @@
> ((= (point) save-pos) ".*")
> - (t (regexp-quote (buffer-substring save-pos (point)))))))
> + (t (buffer-substring save-pos (point))))))
> (skip-chars-forward " \t")
I realized `regexp-quote' is necessary since
`mailcap-possible-viewers' runs `string-match' to test if it
matches that of an attachment. Therefore all the MIME subtypes
listed in the initial value of `mailcap-mime-data' should also
be regexp-quote'd. I've fixed it.
prev parent reply other threads:[~2011-08-26 9:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-23 10:43 Katsumi Yamaoka
2011-08-26 9:02 ` Katsumi Yamaoka [this message]
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=b4msjoolf5j.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).