paul vixie wrote:
Ken Hornstein wrote:Well, it depends on the message. Sometimes I get a message with 20 photos attached. I just want to be able to easily go from one to the next without having to type their part number.But ... what's wrong with doing something like: mhstore -type image Then you can deal with each of those photos as a seperate file.ui wise, i don't want files. i want to act on the attachments (view them, in this case) and then leave them stored as attachments (without having to delete any temporary files.) i don't know exactly how to match mime to the simplicity of show(1), and i've been violently repulsed any time i tried to use mhshow(1), but i think what i want would look a bit like whatnow(1) is to send(1). (for many years i used "send -wa" because my sendmail.cf was a hack, then i used "push" when i stopped being fascinated by SMTP traces.) the command set i'd suggest for whatnowmime(1) would include things like: ls | dir shows the full message structure (like in ftp) cd x.y.z go to part x subpart y subsubpart z next go to next attachment at same level (like in gdb) step go to next attachment at or below the current one (like gdb) prev opposite of next back opposite of step up go up one level view launch an external viewer suitable for this mimetype show do the best you can in inline ascii for this mimetype save [-r] [x.y.z] save the current part (default) or part x subpart y subsubpart z, maybe recursively (-r) quit exit from mhshow(1)
i wrote a script for myself (and my wife) that does much of this (but by no means all). the script i use to actually read a mail message invokes mhshow for the main parts, and then invokes my "mhdisp" script. mhdisp does the work of wandering through the parts of the message in order (as well as letting the user select a specific part), and either does the obvious thing (i.e., displays a text part) or asks the user what to do (as in the case of a pdf -- i use different readers at different times), or lets me save a part as a file, and prompts me with a default filename. it's made life with MH and MIME much more pleasant in our household. there's a bit of a chewing-gum-and-string aspect to it all -- for instance, to force some actions from mhshow i create custom profiles on the fly for it to use for that invocation. it was easier to do that than create a single profile that always did the right thing in all cases. other than being customized mainly for the mail i get (i never receive audio files, so there's no custom handler for those, for instance), the biggest missing piece currently is a fully recursive handler for message/rfc822 parts. i end up having to save those to a file, and then run mhdisp on them separately. i don't see anything terribly difficult about converting what i've done as a looping "what do you want to do next?" shell into separate commandline commands, except for the preservation of state between each such command, and the necessary reparsing of the original message for each one. all of the currently hard-coded actions would need to be sensibly configurable, too, probably with something different than the current mhn.defaults. so in principle what paul is asking for is SMOP (simple matter of programming), but it's definitely a project. (i just reread paul's message, above, and realize he wasn't describing separate commandline commands, but the sub-commands in a whatnowmime shell. that's more similar to what i've done than i realized.) i've attached mhdisp in case someone wants to see it. it's never been out in the wild before, so it might depend horribly on my environment -- no promises. paul
-- P Vixie _______________________________________________ Nmh-workers mailing list Nmh-workers(_at_)nongnu(_dot_)org https://lists.nongnu.org/mailman/listinfo/nmh-workers
=---------------------- paul fox, pgf(_at_)foxharp(_dot_)boston(_dot_)ma(_dot_)us (arlington, ma, where it's 38.8 degrees)
mhdisp
Description: mhdisp
_______________________________________________ Nmh-workers mailing list Nmh-workers(_at_)nongnu(_dot_)org https://lists.nongnu.org/mailman/listinfo/nmh-workers
Previous by Date: | Re: [Nmh-workers] Future directions for nmh, Paul Vixie |
---|---|
Next by Date: | Re: [Nmh-workers] Future directions for nmh, David Levine |
Previous by Thread: | Re: [Nmh-workers] Future directions for nmh, Paul Vixie |
Next by Thread: | Re: [Nmh-workers] Future directions for nmh, Ken Hornstein |
Indexes: | [Date] [Thread] [Top] [All Lists] |