Re: What to use for displaying MIME?
Troy Piggins <[email protected]>
| Newsgroups | gmane.network.slrn.user |
|---|---|
| Message-ID | <[email protected]> |
* Grant Edwards is quoted & my replies are inline below : > On 2007-03-29, Troy Piggins <[email protected]> wrote: > > >> Yup, that's where I started. demime just doesn't work very > >> well. It doesn't seem to handle signed posts or nested > >> message structures. > > > > When you say 'demime' - do you mean the demime perl script, or > > demime.sl the s-lang macro? > > The perl script. (The slang works fine.) Within the first day > of usage, I ran across a number of signed articles where the > demime perl script just deleted both the signed message and the > signature and left nothing. Could you provide Message-IDs so I can see what you mean? > > MIME/PGP signed? > > Yup. > > > Works for me - see screenshots on the above URL. I'd like to > > know more. Not sure about nested structures. > > All I can say is that some messages I tried to read didn't work > for me. One example that didn't work was a multipart/mixed > message where there were a couple text/plain parts and one > multipart/signed part. Message-ID? > Another thing I didn't like much about demime was that it > didn't show any indication what sections had been removed from > multipart/mixed, and didn't give any indication of where the > boundaries were for the sections of a multipart/mixed that it > did render. > > If "attachments" were removed, I'd like to know their type and > name. When multiple text/plain sections are rendered, I want > to know where the boundaries were. > > It also seemed to make no attempt to render HTML message > sections. In a multipart/alternative, I'd like just the > text/plain version, but if there is no text/plain, then I want > to see the text/html version rendered in a reasonable manner. Aah. I see. Actually I killfile all text/html only messages. I know it's ruthless. > >> I'm also a bit confused by display_filter.sl attempting to bind > >> the key's \e6 and \e7. That simply doesn't work for me. > >> AFAICT, \eN where N is a digit is treated as a command prefix, > >> and you can't bind a command to it. Changing display_filter.sl > >> to bind \m and \M seems to work. > > > > You can change the key bindings to anything you like. > > What I'm saying is that I couldn't. I tried to bind the > commands to \e6 and \e7 using your slang file, but it didn't > work. AFAICT, my copy of slrn always treats escape-6 and > escape-7 as command prefixes, not commands themselves. I was > wondering what you did to make \e6 and \e7 work. Are you typing <esc>6 etc in group or article mode? It works in article mode, and group mode I see the command prefix message you must be seeing. #v+ define register_display_filters () { () = register_hook ("read_article_hook", "demime"); () = register_hook ("read_article_hook", "t_prot"); () = register_hook ("read_article_hook", "display_filter"); } define unregister_display_filters () { () = unregister_hook ("read_article_hook", "demime"); () = unregister_hook ("read_article_hook", "t_prot"); () = unregister_hook ("read_article_hook", "display_filter"); } register_display_filters (); definekey ("register_display_filters", "\e6", "article"); definekey ("unregister_display_filters", "\e7", "article"); #v- To get it to work in group mode: #v+ definekey ("register_display_filters", "\e6", "group"); definekey ("unregister_display_filters", "\e7", "group"); #v- > >> [I've just fixed my unmime.py so that it doesn't strip off all > >> of the headers.] Now you can reply to messages in addition to > >> being able to read them. :) > > > > Well done. I don't know python, other than the fact they live > > in zoos ;-) > > Python is a very nice object-oriented programming language. > > www.python.org > > It's byte-compiled and run on a VM (like Java, Perl, and many > others). It's got a very extensive standard library that > includes things like MIME e-mail message handling modules that > let you do in 60 lines what took 3000 lines of Perl. ;) If you don't mind mailing it or making it public, could I get a copy of your script? I'll try it out, and if it's better than the perl demime will post instructions, credits, links etc on my slrn page. -- Troy Piggins ,-O (o- O slrn macros and howto: http://piggo.com/~troy/slrn O ) //\ O http://piggo.com/~troy `-O V_/_ OOO RLU#415538 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV