Thread View: news.software.readers
7 messages
7 total messages
Started by Troy Piggins
Wed, 18 Jul 2007 23:49
[slrn] PJR -> viewing raw articles
Author: Troy Piggins
Date: Wed, 18 Jul 2007 23:49
Date: Wed, 18 Jul 2007 23:49
59 lines
2970 bytes
2970 bytes
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. 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.
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.
--
Troy Piggins | http://piggo.com/~troy
___ | __ __ ,-O (o- O
slrn macros and howto: |___ | |/ |/ | O ) //\ O
http://piggo.com/~troy/slrn ___| | | | | `-O V_/_ OOO
Re: [slrn] PJR -> viewing raw articles
Author: 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 :-)
Re: [slrn] PJR -> viewing raw articles
Author: Thomas Wiegner
Date: Sun, 22 Jul 2007 14:00
Date: Sun, 22 Jul 2007 14:00
19 lines
1537 bytes
1537 bytes
On Sun, 22 Jul 2007, Peter J Ross <pjr@example.invalid> wrote: > 2. Recent slrn (cvs and possibly pl1) uses iconv to display MIME > articles. pl1 doesn't use iconv, it's just pl2 which one can get from cvs (or from debian). > If an article declares a non-standard charset that isn't > supported by iconv, the article can't be displayed by slrn at all. The "fallback charset" patch also fixes this issue. Cheers, Thomas -- slrn charset patches: http://www.foory.de/thw/slrn/
Re: [slrn] PJR -> viewing raw articles
Author: Peter J Ross
Date: Sun, 22 Jul 2007 16:27
Date: Sun, 22 Jul 2007 16:27
23 lines
1795 bytes
1795 bytes
In news.software.readers on Sun, 22 Jul 2007 16:00:10 +0200, Thomas Wiegner <wiegner@gmx.de> wrote: > On Sun, 22 Jul 2007, Peter J Ross <pjr@example.invalid> wrote: > >> 2. Recent slrn (cvs and possibly pl1) uses iconv to display MIME >> articles. > > pl1 doesn't use iconv, it's just pl2 which one can get from cvs (or from > debian). That explains the lack of complaints. >> If an article declares a non-standard charset that isn't >> supported by iconv, the article can't be displayed by slrn at all. > > The "fallback charset" patch also fixes this issue. I'm now using it, without problems so far. Thanks. -- PJR :-)
Re: [slrn] PJR -> viewing raw articles
Author: Frank Slootweg
Date: Sun, 22 Jul 2007 17:39
Date: Sun, 22 Jul 2007 17:39
23 lines
2186 bytes
2186 bytes
Peter J Ross <pjr@example.invalid> wrote:
[deleted]
> 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.
I understand that you already have a solution ("The "fallback charset"
patch also fixes this issue."), so this is probably moot, but can't you
just save the problem article and read it in your editor when replying?
That should also work if reply doesn't work at all: Just reply to any
other article (or write a new 'base' article), and once in the editor,
delete everthing and read in the problem article from the saved file.
That method would work in tin and I assume it will also work in slrn.
After all, slrn also gives you full control over your postings, doesn't
it? :-)
Re: [slrn] PJR -> viewing raw articles
Author: Peter J Ross
Date: Sun, 22 Jul 2007 18:23
Date: Sun, 22 Jul 2007 18:23
52 lines
3341 bytes
3341 bytes
In news.software.readers on 22 Jul 2007 17:39:20 GMT, Frank Slootweg
<this@ddress.is.invalid> wrote:
> Peter J Ross <pjr@example.invalid> wrote:
> [deleted]
>
>> 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.
>
> I understand that you already have a solution ("The "fallback charset"
> patch also fixes this issue."), so this is probably moot, but can't you
> just save the problem article and read it in your editor when replying?
No, iconv is called when following-up as well as when displaying the
article.
Reliance on iconv would be fine if other people used registered
charset names instead of making them up.
> That should also work if reply doesn't work at all: Just reply to any
> other article (or write a new 'base' article), and once in the editor,
> delete everthing and read in the problem article from the saved file.
... and rewrite the headers and insert quote indicators. Moreover,
slrn appends saved articles to a mailbox file, which would mean that a
unique name would have to be specified for each such saved article.
My little macro allows me to view the article and decide whether such
effort is worth while. (And Thomas's excellent patch saves me the
trouble of using the macro at all, except when I want to view raw
headers.)
> That method would work in tin and I assume it will also work in slrn.
> After all, slrn also gives you full control over your postings, doesn't
> it? :-)
slrn *with vim* allows me full control. :-)
Anyway, this "bug" exists only in cvs, not in any released version of
slrn, so nobody should think they need to mess around with source code
and patches to use slrn. "apt-get install slrn" or equivalent should
work fine for almost everybody.
--
PJR :-)
Re: [slrn] PJR -> viewing raw articles
Author: Frank Slootweg
Date: Sun, 22 Jul 2007 19:39
Date: Sun, 22 Jul 2007 19:39
17 lines
1769 bytes
1769 bytes
Peter J Ross <pjr@example.invalid> wrote: > In news.software.readers on 22 Jul 2007 17:39:20 GMT, Frank Slootweg > <this@ddress.is.invalid> wrote: [deleted] > > That should also work if reply doesn't work at all: Just reply to any > > other article (or write a new 'base' article), and once in the editor, > > delete everthing and read in the problem article from the saved file. > > ... and rewrite the headers and insert quote indicators. Oops! You're right. Stupid idea! Well, it was worth *exactly* what you payed for it! :-) Note to self: Not only learn to *read*, but also to *think*! [deleted]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads