nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] pager for mhshow of non-text parts?

2014-04-21 14:25:45
i'm getting an unexpected invocation of less when running mhshow on
non-text parts.  i.e., if part 3 is image/jpeg, then

   MHSHOW=/dev/null mhshow -form mhl.null -part 3

gives this process tree:

 mhshow -form mhl.null -part 3
  \_ less
  \_ sh -c xv -geometry =-0+0 '/home/pgf/Mail/mhshowPnswsQ.jpeg' "$@" /bin/sh
      \_ xv -geometry =-0+0 /home/pgf/Mail/mhshowPnswsQ.jpeg

So, technically it's not running less for that part; it's running less on
all output by mhshow.  It just so happens that since you added -form mhl.null,
there's no header output and the only output on stdout is the marker line.

When I brought this up before during the discussion about changes to
mhshow, no one seemed to care.  If you want to revert to the old behavior
of not running all of mhshow under less, you could always use -noconcat.

the text that's passed through less is the part separator line:

   part 3     image/jpeg                 20K

it doesn't seem to me that less should be run for non-text parts,
nor should the part separator be displayed when mhshowing a specific
part.  (i suspect the two things are linked, of course.)

They're independent.  Actually, I don't think the code for the marker
line has changed; mhshow would always display one.

I'm a little unclear how we could intelligently decide when to run the
pager or not; we have to decide pretty early on whether or not to start
the pager, since we have to dup2() the pager input down to stdout.

in addition, on this particular message i'm getting an unexpected
error after the viewing process (xv) is finished:

   $ MHSHOW=/dev/null mhshow -form mhl.null -part 3 10
   part 3     image/jpeg                 20K
   mhshow: don't know how to display any of the contents
          (content multipart/alternative in message 10, part 1)

I'll have to figure that one out; I probably messed up somewhere.
There's some weird handling for multipart/alternative that I could have
got wrong.

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>