"Sullivan N. Beck" <[EMAIL PROTECTED]> writes:
> I'm trying to get mhshow to automatically open up various applications
> when different MIME types are present, and most of them work, but there
> are a few exceptions.
> 
> The temporary files created by mhshow are names like: mhshowXXXXXX ,
> and a few apps require a suffix in order to work correctly.
> 
> For example, with application/PostScript , I can get it to work
> by using the line:
>     mhshow-show-application/PostScript: %pgv -
> but NOT
>     mhshow-show-application/PostScript: %pgv '%F'
> because gs/gv won't take a filename without the .ps suffix correctly (if
> the file doesn't end in .ps, it appends it and then can't find the
> resulting file).  Although this isn't so important (because I've got
> a workaround), I'd like to use staroffice to automatically open with
> application/msword (and others) types.  With a suffix, it's working
> fine.  Without, it doesn't.
> 
> I could also write a simple wrapper script, but I'd rather not since
> that means that I have to make changes in two places every time I add
> a new MIME application.
> 
> Any suggestions?  Am I missing something basic?  Probably so.

No, you're not missing anything.  It's unfortunate that you can add suffixes
on mhn.defaults' mhstore directives:

    mhstore-store-application/PostScript: %m%P.ps
    mhstore-store-text/richtext: %m%P.rt
    mhstore-store-text: %m%P.txt
    mhstore-store-video/mpeg: %m%P.mpg
    
but not on the mhshow directives.  When I was adding a check for lynx in
mhn.defaults.sh recently, I almost started to implement the ability to add
extensions, but then I found lynx's -force_html flag:

    mhshow-show-text/html: %plynx -force_html '%F'

so I put it off.  Dan Winship was recently mucking around in the %-escape
code -- maybe he has an idea of how hard or easy it'd be to implement this.

-----------------------------------------------------------------------
Dan Harkless                   | To prevent SPAM contamination, please 
[EMAIL PROTECTED]      | do not post this private email address
SpeedGate Communications, Inc. | to the USENET or WWW.  Thank you.     

Reply via email to