[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] proposed patch for shell metacharacter failure in nmh-
From: |
Steven Winikoff |
Subject: |
Re: [Nmh-workers] proposed patch for shell metacharacter failure in nmh-1.7 |
Date: |
Sat, 13 Jan 2018 18:08:36 -0500 |
>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 |
address@hidden | Nothing *ever* gets built on schedule
| or within budget.
- [Nmh-workers] proposed patch for shell metacharacter failure in nmh-1.7, Steven Winikoff, 2018/01/13
- Re: [Nmh-workers] proposed patch for shell metacharacter failure in nmh-1.7, David Levine, 2018/01/13
- Re: [Nmh-workers] proposed patch for shell metacharacter failure in nmh-1.7,
Steven Winikoff <=
- Re: [Nmh-workers] proposed patch for shell metacharacter failure in nmh-1.7, David Levine, 2018/01/13
- Re: [Nmh-workers] proposed patch for shell metacharacter failure in nmh-1.7, Steven Winikoff, 2018/01/13
- Re: [Nmh-workers] proposed patch for shell metacharacter failure in nmh-1.7, David Levine, 2018/01/14
- Re: [Nmh-workers] proposed patch for shell metacharacter failure in nmh-1.7, Steven Winikoff, 2018/01/14
- Re: [Nmh-workers] rcvdist with non-default port, David Levine, 2018/01/14
- Re: [Nmh-workers] rcvdist with non-default port, Steven Winikoff, 2018/01/14
- Re: [Nmh-workers] rcvdist with non-default port, David Levine, 2018/01/14
- Re: [Nmh-workers] rcvdist with non-default port, Steven Winikoff, 2018/01/14
- Re: [Nmh-workers] rcvdist with non-default port, David Levine, 2018/01/14
- Re: [Nmh-workers] rcvdist with non-default port, Ken Hornstein, 2018/01/14