Article View: news.software.readers
Article #202230Re: [slrn] PJR -> viewing raw articles
From: Peter J Ross
Date: Sun, 22 Jul 2007 11:49
Date: Sun, 22 Jul 2007 11:49
78 lines
3617 bytes
3617 bytes
In news.software.readers on Thu, 19 Jul 2007 09:49:57 +1000, Troy
Piggins <usenet-0707@piggo.com> wrote:
> Peter,
>
> Had a quick look at your macro:
>
> #v+
> define show_raw ()
> {
> variable state = get_header_flags ();
> set_input_string ("/tmp/slrn_raw");
> call ("save");
> system ("less /tmp/slrn_raw && rm /tmp/slrn_raw");
> set_header_flags (state);
> set_input_string ("");
> }
> definekey ("show_raw", "<F2>", "article");
> #v-
>
> I can't see a "quicker" way of viewing raw articles. By "quicker" I mean
> less lines.
>
> My immediate thoughts were use the raw_article_as_string slrn
> function like in my display_filter macro.
>
> #v+
> define show_raw2 ()
> {
> variable raw_file = "/tmp/slrn_raw."+ string (getpid() );
> variable raw_art = raw_article_as_string ();
> variable fp = fopen (raw_file, "w");
> fputs (raw_art, fp);
> fclose (fp);
> system ("less "+raw_file" && rm "+raw_file);
> }
>
> definekey ("show_raw2", "<F2>", "article");
> #v-
>
> But I'm not happy with that at the moment - my display filter
> processing it first (t-prot is affecting it), so it can't be the
> true raw file it's seeing.
I tried similar methods, and they didn't work even without your
display filter.
> The display filter uses
> replace_article which affects what you can get from
> raw_article_as_string. I think I need to re-fetch the article
> first or disable diplay_filter, then I'd probably use the
> replace_article function from within the show_raw macro so you
> can view the raw article within slrn's article window rather than
> "less". Hope that makes sense.
It makes sense, but I haven't been able to write anything that works.
> I think if your macro works, and it does, then just keep using
> it. I would. It's not too different from the second way.
>
> I can't help but wonder why you need this macro, though. I find
> displaying full headers and turning off display filters does the
> same thing.
1. I want to be able to view uninterpreted Quoted-Printable/Base64
headers, and headers that wrongly fail to encode non-ASCII characters.
2. Recent slrn (cvs and possibly pl1) uses iconv to display MIME
articles. If an article declares a non-standard charset that isn't
supported by iconv, the article can't be displayed by slrn at all.
My method allows me to view such articles but not to reply to them
explaining why they're broken.
Thanks for your help.
--
PJR :-)
Technical Details
Message-ID:
<slrnfa6h20.hej.pjr@pjr.gotdns.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news1.google.com!news.glorb.com!news-out.octanews.net!indigo.octanews.net!authen.yellow.readfreenews.net.POSTED!not-for-mailReferences:
<20070719092520@usenet.piggo.com>Show Full Headers
Complete Article Headers
Message-ID: <slrnfa6h20.hej.pjr@pjr.gotdns.org> Subject: Re: [slrn] PJR -> viewing raw articles Date: Sun, 22 Jul 2007 11:49:20 +0000 From: Peter J Ross <pjr@example.invalid> References: <20070719092520@usenet.piggo.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news1.google.com!news.glorb.com!news-out.octanews.net!indigo.octanews.net!authen.yellow.readfreenews.net.POSTED!not-for-mail Newsgroups: news.software.readers Organization: none Reply-To: pjr.spam@gmail.com User-Agent: slrn/0.9.8.1pl2 (Debian) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 78 NNTP-Posting-Date: 22 Jul 2007 06:49:20 CDT X-Trace: DXC=gU`KB\LQ3n3WQ:A; LOKHX>]AGWjF5PjP9465Ue@WB_5?o?QKVDNlH]:26Z<EbT:a\5lV3mi\haFg8nKNSiQ2:B?>4E1h<^\?Ra1