On 1999/02/24, Jerry Peek wrote:
> > In the screenshot above, I noticed that you use mhshow.  mhshow
> > expects a message number, not a file name.  Did you explicitly
> > instruct nmh to use mhshow as your lproc?
> 
> Nope, I've got "show" as my lproc.  It's "show" that's invoking
> "mhshow".  That's the way it's been for months (years?) now.

> I guess it's possible that something in my environment could be causing
> the problem.  But "What now? list" used to work on MIME messages under
> MH -- and, I'm almost sure, under nmh-0.26 (or was it 0.24?), the
> version that came RPM'ed with Red Hat Linux 5.1.

It turns out that if the lproc is set to "show", then whatnow will actually
invoke it as "show -file".  This code is in sbr/showfile.c, line 48.

Show has some similar logic at uip/show.c, starting at line 303.  However,
it will only pass on the "-file" switch if the program to be invoked is
mhn, which was appropriate for older nmh releases.  Here's a quick and dirty
patch which propagates -file also in the case of mhshow.

        - Ruud de Rooij.

--- nmh-1.0.orig/uip/show.c
+++ nmh-1.0/uip/show.c
@@ -315,6 +315,15 @@
        vec[vecp] = NULL;
     }
 
+    /* If the "proc" is "mhshow", add "-file" if showing file or draft.
+     * Ruud de Rooij <[EMAIL PROTECTED]>  Wed, 24 Feb 1999 19:31:40 +0100
+     */
+    if (strcmp (r1bindex (proc, '/'), "mhshow") == 0 && (draftsw || file) ) {
+       vec[vecp] = vec[vecp - 1];
+       vec[vecp - 1] = "-file";
+       vec[++vecp] = NULL;
+    }
+
     /*
      * If "proc" is mhl, then run it internally
      * rather than exec'ing it.

-- 
Ruud de Rooij
[EMAIL PROTECTED]
http://sepc.twi.tudelft.nl/~derooij/

Reply via email to