Thread View: news.software.readers
10 messages
10 total messages
Started by r
Fri, 22 May 2009 12:17
Slrn
Author: r
Date: Fri, 22 May 2009 12:17
Date: Fri, 22 May 2009 12:17
10 lines
1295 bytes
1295 bytes
is there a way/patch/macro, in the messagges menu, to update the messagges list with new messagges instead of quit from messagges-list going in the groups list and re-enter in messagges-list ?
Re: Slrn
Author: Christian Ebert
Date: Fri, 22 May 2009 13:52
Date: Fri, 22 May 2009 13:52
49 lines
3008 bytes
3008 bytes
* r on Friday, May 22, 2009:
> is there a way/patch/macro, in the messagges menu, to update the
> messagges list with new messagges instead of quit from
> messagges-list going in the groups list and re-enter in messagges-list ?
The following should do what you want, including going back to
where you were:
#v+
implements ("RefreshInArticleMode");
static define refresh ()
{
variable msgid = extract_article_header ("Message-ID"),
show_article = get_variable_value ("show_article"),
isvisible = is_article_visible (),
cutoff = get_variable_value ("query_read_group_cutoff");
call ("undelete"); % do not expunge article
call ("quit");
% in group display now
call ("refresh_groups");
% silently reenter group
set_integer_variable ("query_read_group_cutoff", 0);
call ("select_group");
set_integer_variable ("query_read_group_cutoff", cutoff);
() = locate_header_by_msgid (msgid, 0);
% display article if it was shown before:
if (isvisible == 3 and show_article == 0 ||
isvisible != 3 and show_article != 0)
call ("hide_article");
}
definekey ("RefreshInArticleMode->refresh", "R", "article");
#v-
As you've seen I've mapped the macro call to "R".
If you S-Lang version is < 2.1 iirc you'd have to replace the ||
operators with an orelse construct. Anyway, try it out.
c
--
Was heiรt hier Dogma, ich bin Underdogma!
[ What the hell do you mean dogma, I am underdogma. ]
_F R E E_ _V I D E O S_ http://www.blacktrash.org/underdogma/
http://www.blacktrash.org/underdogma/index-en.html
Re: Slrn
Author: r
Date: Fri, 22 May 2009 16:21
Date: Fri, 22 May 2009 16:21
53 lines
2649 bytes
2649 bytes
On 2009-05-22, Christian Ebert <blacktrash@gmx.net> wrote:
> * r on Friday, May 22, 2009:
>> is there a way/patch/macro, in the messagges menu, to update the
>> messagges list with new messagges instead of quit from
>> messagges-list going in the groups list and re-enter in messagges-list ?
>
> The following should do what you want, including going back to
> where you were:
>
> #v+
>
> implements ("RefreshInArticleMode");
>
> static define refresh ()
> {
> variable msgid = extract_article_header ("Message-ID"),
> show_article = get_variable_value ("show_article"),
> isvisible = is_article_visible (),
> cutoff = get_variable_value ("query_read_group_cutoff");
> call ("undelete"); % do not expunge article
> call ("quit");
>
> % in group display now
> call ("refresh_groups");
> % silently reenter group
> set_integer_variable ("query_read_group_cutoff", 0);
> call ("select_group");
> set_integer_variable ("query_read_group_cutoff", cutoff);
>
> () = locate_header_by_msgid (msgid, 0);
> % display article if it was shown before:
> if (isvisible == 3 and show_article == 0 ||
> isvisible != 3 and show_article != 0)
> call ("hide_article");
> }
>
> definekey ("RefreshInArticleMode->refresh", "R", "article");
> #v-
>
> As you've seen I've mapped the macro call to "R".
>
> If you S-Lang version is < 2.1 iirc you'd have to replace the ||
> operators with an orelse construct. Anyway, try it out.
>
> c
just a question
I'm really ignorant in programming and in managing macro, do I have to
put this code in ~/.slrnrc ?
R
Re: Slrn
Author: r
Date: Fri, 22 May 2009 17:02
Date: Fri, 22 May 2009 17:02
15 lines
1487 bytes
1487 bytes
On 2009-05-22, Christian Ebert <blacktrash@gmx.net> wrote: > As you've seen I've mapped the macro call to "R". > > If you S-Lang version is < 2.1 iirc you'd have to replace the || > operators with an orelse construct. Anyway, try it out. > ok Christian I've found the way in slrn site. just a little trouble, now it download every header, if there are 45000 header when I press on "R" it downloads everything, is it possible to modify the macro to download just 500 headers ? Roberto
Re: Slrn
Author: r
Date: Fri, 22 May 2009 17:11
Date: Fri, 22 May 2009 17:11
41 lines
2184 bytes
2184 bytes
On 2009-05-22, r <none@linux.com> wrote:
> On 2009-05-22, Christian Ebert <blacktrash@gmx.net> wrote:
>> As you've seen I've mapped the macro call to "R".
>>
>> If you S-Lang version is < 2.1 iirc you'd have to replace the ||
>> operators with an orelse construct. Anyway, try it out.
>>
> ok Christian I've found the way in slrn site.
> just a little trouble, now it download every header, if there are
> 45000 header when I press on "R" it downloads everything, is it possible
> to modify the macro to download just 500 headers ?
>
>
> Roberto
>
>
ok Christian it seems I solved, I modified this line
% silently reenter group
set_integer_variable ("query_read_group_cutoff", 0);
call ("select_group");
set_integer_variable ("query_read_group_cutoff", cutoff);
with this line
% silently reenter group
set_integer_variable ("query_read_group_cutoff", 500);
call ("select_group");
set_integer_variable ("query_read_group_cutoff", cutoff);
I just changed 0 with 500 and now when I press "R" it does asks me "how
many headers" I want to download.
Very, Very, good job
Great Christian
Re: Slrn
Author: John E. Davis
Date: Fri, 22 May 2009 17:47
Date: Fri, 22 May 2009 17:47
24 lines
1751 bytes
1751 bytes
On Fri, 22 May 2009 15:52:21 +0200, Christian Ebert <blacktrash@gmx.net>
wrote:
> % display article if it was shown before:
> if (isvisible == 3 and show_article == 0 ||
> isvisible != 3 and show_article != 0)
> call ("hide_article");
[...]
> If you S-Lang version is < 2.1 iirc you'd have to replace the ||
> operators with an orelse construct. Anyway, try it out.
In this case, short-circuiting operators are not needed. So, it can
be coded using `or' in place of `||'. Note that `||' and `&&'
short-circuit, whereas `or' and `and' do not. The old `orelse' and
`andelse' constructs are obsolete and should not be used.
FWIW, the test can also be written as:
#v+
if ((isvisible==3) xor show_article)
call ("hide_article");
#v-
Thanks,
--John
Re: Slrn
Author: John E. Davis
Date: Fri, 22 May 2009 20:31
Date: Fri, 22 May 2009 20:31
17 lines
1385 bytes
1385 bytes
I wrote:
> FWIW, the test can also be written as:
> #v+
> if ((isvisible==3) xor show_article)
> call ("hide_article");
> #v-
I forgot to mention that the above assumes that show_article is either
0 or 1. For 0 or non-0, the above should be written:
#v+
if ((isvisible==3) xor (show_article != 0))
call ("hide_article");
#v-
The reason for the distinction is that `xor' is a bitlevel operator.
Thanks, --John
Re: Slrn
Author: Christian Ebert
Date: Fri, 22 May 2009 20:41
Date: Fri, 22 May 2009 20:41
39 lines
2823 bytes
2823 bytes
* r on Friday, May 22, 2009:
> On 2009-05-22, r <none@linux.com> wrote:
>> ok Christian I've found the way in slrn site.
>> just a little trouble, now it download every header, if there are
>> 45000 header when I press on "R" it downloads everything, is it possible
>> to modify the macro to download just 500 headers ?
>
> ok Christian it seems I solved, I modified this line
>
> % silently reenter group
> set_integer_variable ("query_read_group_cutoff", 0);
> call ("select_group");
> set_integer_variable ("query_read_group_cutoff", cutoff);
>
>
> with this line
>
> % silently reenter group
> set_integer_variable ("query_read_group_cutoff", 500);
> call ("select_group");
> set_integer_variable ("query_read_group_cutoff", cutoff);
>
>
> I just changed 0 with 500 and now when I press "R" it does asks me "how
> many headers" I want to download.
You can also omit the whole query_read_group_cutoff stuff; then
your setting of query_read_group_cutoff is used.
You probably read online, whereas I read from a local (leafnode)
server and wanted to make the macro feel like it wasn't actually
a macro, just one keypress and that's it ;-)
c
--
\black\trash movie _C O W B O Y_ _C A N O E_ _C O M A_
Ein deutscher Western/A German Western
-->> http://www.blacktrash.org/underdogma/ccc.html
-->> http://www.blacktrash.org/underdogma/ccc-en.html
Re: Slrn
Author: Christian Ebert
Date: Fri, 22 May 2009 20:45
Date: Fri, 22 May 2009 20:45
37 lines
2800 bytes
2800 bytes
* John E. Davis on Friday, May 22, 2009:
> On Fri, 22 May 2009 15:52:21 +0200, Christian Ebert <blacktrash@gmx.net>
> wrote:
>> % display article if it was shown before:
>> if (isvisible == 3 and show_article == 0 ||
>> isvisible != 3 and show_article != 0)
>> call ("hide_article");
> [...]
>> If you S-Lang version is < 2.1 iirc you'd have to replace the ||
>> operators with an orelse construct. Anyway, try it out.
>
> In this case, short-circuiting operators are not needed. So, it can
> be coded using `or' in place of `||'. Note that `||' and `&&'
> short-circuit, whereas `or' and `and' do not. The old `orelse' and
> `andelse' constructs are obsolete and should not be used.
Now you've got me puzzling (again) what "short-circuiting"
actually means. I believe I understood it once, long ago ...
Time to study slang.txt again ;-)
> FWIW, the test can also be written as:
> #v+
> if ((isvisible==3) xor show_article)
> call ("hide_article");
> #v-
Now, that looks cool. Unfortunately it will tie a few more knots
in my brain.
Thanks.
c
--
Was heiรt hier Dogma, ich bin Underdogma!
[ What the hell do you mean dogma, I am underdogma. ]
_F R E E_ _V I D E O S_ http://www.blacktrash.org/underdogma/
http://www.blacktrash.org/underdogma/index-en.html
Re: Slrn
Author: r
Date: Fri, 22 May 2009 21:32
Date: Fri, 22 May 2009 21:32
9 lines
1444 bytes
1444 bytes
On 2009-05-22, Christian Ebert <blacktrash@gmx.net> wrote: > You can also omit the whole query_read_group_cutoff stuff; then > your setting of query_read_group_cutoff is used. > > You probably read online, whereas I read from a local (leafnode) > server and wanted to make the macro feel like it wasn't actually > a macro, just one keypress and that's it ;-) ok
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