Would you consider this?
mhshow-show-application/pdf: %pmime_helper %F %s "%{name}"
Yes, I would. I just tested it against the unpatched 1.7, and it works.
That handles the embedded quote, which I think is why mhshow
doesn't quote the argument correctly.
The problem was the embedded parentheses, specifically the (002) part of
the filename:
=?iso-8859-1?Q?SEAO_-_R=E9sultats_d'ouverture_(002).pdf?=
But yes, "%{name}" does the right thing with that.
And it would be nice if nmh could decode the filename, so your
mime_helper doesn't have to (if it does).
It certainly would. :-)
This works, though hopefully there's a better way:
mhshow-show-application/pdf: %pmime_helper %F %s `fmttest -raw -format
'%(decode{text})' "%{name}"`
I had to revise it just slightly:
mhshow-show-application/pdf: %pmime_helper %F %s "`fmttest -raw -format
'%(decode{text})' \"%{name}\"`"
This mostly works, but I'm running into quote-handling weirdness.
Specifically, if I run the fmttest command directly, I get this:
% fmttest -raw -format '%(decode{text})'
"=?iso-8859-1?Q?SEAO_-_R=E9sultats_d'ouverture_(002).pdf?="
SEAO - Résultats d'ouverture (002).pdf
...but in .mh_profile, the same thing results in mime_helper receiving
'SEAO - Résultats d'\'ouverture (002).pdf
as its third argument.
(If you want to save a line in your profile, that
mhshow-suffix-application/PDF line is in mhn.defaults.)
It's there, but as mhshow-suffix-application/pdf
Likewise, so is mhshow-suffix-application/postscript
but not mhshow-suffix-application/PostScript
I don't know why I thought these entries are case-sensitive; are they not?
- Steven
--
___________________________________________________________________________
Steven Winikoff |
Concordia University | Cheop's Law:
Montreal, QC, Canada |
Steven.Winikoff@concordia.ca | Nothing *ever* gets built on schedule
| or within budget.
--
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers