🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
32 messages
32 total messages Started by Chris Green Tue, 30 Nov 1999 00:00
SLRN - minor scrolling oddity/bug/feature
#54695
Author: Chris Green
Date: Tue, 30 Nov 1999 00:00
18 lines
1395 bytes
There appears to be no way to scroll down a message if you are looking
at a message with threads collapsed.

I.e. you are reading through a thread and have done an ESC/T so the
thread is collapsed in the article list.  If a message is longer than
a screenful there is no way to view the rest of it.  The scroll_dn
command (executed by hitting the space bar) tries to go to the next
unread message and gets even that wrong as it re-opens the first
message in the thread.

I expect everyone will now suggest I don't collapse the thread, then I
end up with even less space on my screen for reading the actual
messages.

-- 
Chris Green (chris@x-1.net)

Re: SLRN - minor scrolling oddity/bug/feature
#54679
Author: Sylvan Butler
Date: Tue, 30 Nov 1999 00:00
18 lines
1579 bytes
On 30 Nov 1999 16:49:17 GMT, Chris Green <cgreen@shell.x-1.net> wrote:
>I expect everyone will now suggest I don't collapse the thread, then I
>end up with even less space on my screen for reading the actual
>messages.

Nope, I won't suggest that.  :)

I will suggest zooming the article window to full screen.  Looks great.

sdb
-- 
 | Sylvan Butler | Not speaking for Hewlett-Packard | sbutler-boi.hp.com |
 | Watch out for my e-mail address. Thank UCE.   #### change ^ to @ #### |
    They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety. --Benjamin Franklin, 1759
 "Don't Tread On Me!"

Re: SLRN - minor scrolling oddity/bug/feature
#54729
Author: Chris Green
Date: Wed, 01 Dec 1999 00:00
17 lines
1428 bytes
On 30 Nov 1999 17:37:09 GMT, Sylvan Butler <nospam+_no_Zs__9911@hpb13799z.zboi.hpz.com.invalid> wrote:
>On 30 Nov 1999 16:49:17 GMT, Chris Green <cgreen@shell.x-1.net> wrote:
>>I expect everyone will now suggest I don't collapse the thread, then I
>>end up with even less space on my screen for reading the actual
>>messages.
>
>Nope, I won't suggest that.  :)
>
>I will suggest zooming the article window to full screen.  Looks great.
>
Good idea!  I'm now trying to work out how to start in zoomed/full
screen mode by default.

-- 
Chris Green (chris@x-1.net)

Re: SLRN - minor scrolling oddity/bug/feature
#54730
Author: Dawn Owens-Nicholson
Date: Wed, 01 Dec 1999 00:00
10 lines
1005 bytes
Chris Green wrote:
> I expect everyone will now suggest I don't collapse the thread, then I
> end up with even less space on my screen for reading the actual
> messages.

You could also use the article_linedn intrinsic to scroll down as many lines
as you wish without altering the collapse status of a thread.  There is more
than one way to do it.

Re: SLRN - minor scrolling oddity/bug/feature
#54737
Author: Sylvan Butler
Date: Wed, 01 Dec 1999 00:00
48 lines
2872 bytes
On 1 Dec 1999 14:11:22 GMT, Thomas Schultz <tststs@gmx.de> wrote:
>On 01 December 1999 at 09:46 GMT, Chris Green <cgreen@shell.x-1.net> wrote:
>> On 30 Nov 1999 17:37:09 GMT, Sylvan Butler
>> <nospam+_no_Zs__9911@hpb13799z.zboi.hpz.com.invalid> wrote:
>>> I will suggest zooming the article window to full screen. Looks great.
>> Good idea!  I'm now trying to work out how to start in zoomed/full
>> screen mode by default.
>
>You can put 
>
>  !if (is_article_window_zoomed ()) call ("zoom_article_window");
>
>in your article_mode_hook(). However, this will also have the effect
>that the first article in a group is automatically downloaded and
>displayed when you enter it.

I use that line, except it is in my "display article" function.  That
way it doesn't run except when I select an actual article.

I use a rather complex set of interdependent keymapping macros (to
emulate tin) so an excerpt won't do any good...  But something like the
following may work:

=============
define zoomed_article_select ();
{
   !if (is_article_window_zoomed ())
      call ("zoom_article_window");
% use this function from util.sl???   art_select_article ();
   call ("scroll_dn");
}
definekey ("zoomed_article_select", " ", "article");
=============
(replace the " " with the key you want to use to display an article)

You may need to utilize the "is_article_visible" intrinsic, as used in
util.c in order to get the desired behavior...

sdb

-- 
 | Sylvan Butler | Not speaking for Hewlett-Packard | sbutler-boi.hp.com |
 | Watch out for my e-mail address. Thank UCE.   #### change ^ to @ #### |
    They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety. --Benjamin Franklin, 1759
 "Don't Tread On Me!"

Re: SLRN - minor scrolling oddity/bug/feature
#54759
Author: Thomas Schultz
Date: Wed, 01 Dec 1999 00:00
19 lines
1493 bytes
On 01 December 1999 at 09:46 GMT, Chris Green <cgreen@shell.x-1.net> wrote:
> On 30 Nov 1999 17:37:09 GMT, Sylvan Butler
> <nospam+_no_Zs__9911@hpb13799z.zboi.hpz.com.invalid> wrote:
>> I will suggest zooming the article window to full screen. Looks great.
> Good idea!  I'm now trying to work out how to start in zoomed/full
> screen mode by default.

You can put 

  !if (is_article_window_zoomed ()) call ("zoom_article_window");

in your article_mode_hook(). However, this will also have the effect
that the first article in a group is automatically downloaded and
displayed when you enter it.
-- 
Kind regards,
    Thomas Schultz

Re: SLRN - minor scrolling oddity/bug/feature
#54783
Author: Chris Green
Date: Thu, 02 Dec 1999 00:00
25 lines
1872 bytes
On 1 Dec 1999 19:26:56 GMT, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu> wrote:
>Chris Green wrote:
>> I expect everyone will now suggest I don't collapse the thread, then I
>> end up with even less space on my screen for reading the actual
>> messages.
>
>You could also use the article_linedn intrinsic to scroll down as many lines
>as you wish without altering the collapse status of a thread.  There is more
>than one way to do it.

That's exactly the problem, it doesn't work!!!  If you execute the
article_linedn when the thread is collapsed the effect is to take you back
to the top of the first article in the thread.  This is the bug/feature
I was complaining about, article_linedn *doesn't* always move a line
down in an article.

The basic problem is that slrn doesn't differentiate between viewing
an article and viewing the article list.  article_linedn *enters* the
next article if you're viewing the list and, with threads collapsed,
this is what it thinks you're doing.

-- 
Chris Green (chris@x-1.net)

Re: SLRN - minor scrolling oddity/bug/feature
#54784
Author: Chris Green
Date: Thu, 02 Dec 1999 00:00
34 lines
1891 bytes
>I use a rather complex set of interdependent keymapping macros (to
>emulate tin) so an excerpt won't do any good...  But something like the
>following may work:
>
These aren't the supplied tin-group.sl and tin-art.sl are they?


>=============
>define zoomed_article_select ();
>{
>   !if (is_article_window_zoomed ())
>      call ("zoom_article_window");
>% use this function from util.sl???   art_select_article ();
>   call ("scroll_dn");
>}
>definekey ("zoomed_article_select", " ", "article");
>=============
>(replace the " " with the key you want to use to display an article)
>
I have got:-

   art_select_article ();
   !if (is_article_window_zoomed ())
   {
      zoom_article_window ();
   }

at the end of my tin_art_next_unread_or_group function already.  Why
have you got call("scroll_dn") in the above?

-- 
Chris Green (chris@x-1.net)

Re: SLRN - minor scrolling oddity/bug/feature
#54788
Author: Dawn Owens-Nicholson
Date: Thu, 02 Dec 1999 00:00
10 lines
1172 bytes
Chris Green wrote:
> The basic problem is that slrn doesn't differentiate between viewing an
> article and viewing the article list.

How does is_article_visible() not do this?  You can tell whether you're not
seeing the article at all, seeing the article being pointed to by the cursor
and seeing an article not being pointed to by the cursor and, of course, not
in article mode (which you don't really need this for to begin with).

Re: SLRN - minor scrolling oddity/bug/feature
#54789
Author: Sylvan Butler
Date: Thu, 02 Dec 1999 00:00
46 lines
2816 bytes
On 2 Dec 1999 15:54:54 GMT, Chris Green <cgreen@shell.x-1.net> wrote:
>>I use a rather complex set of interdependent keymapping macros (to
>>emulate tin) so an excerpt won't do any good...  But something like the
>>following may work:
>>
>These aren't the supplied tin-group.sl and tin-art.sl are they?

  :)

Not quite, unless JED has shipped the changes I submitted...  Mine are a
lot more finger-compatible with the old standard tin 1.2.

>>=============
>>define zoomed_article_select ();
>>{
>>   !if (is_article_window_zoomed ())
>>      call ("zoom_article_window");
>>% use this function from util.sl???   art_select_article ();
>>   call ("scroll_dn");
>>}
>>definekey ("zoomed_article_select", " ", "article");
>>=============
>I have got:-
>   art_select_article ();
>at the end of my tin_art_next_unread_or_group function already.  Why

My tin_art_next_unread_or_group sounds much like yours, except
I zoom before the art_select_article()  :)

>have you got call("scroll_dn") in the above?

Because I didn't remember or know that you were using the tin_...
functions, or any util.sl functions.  art_select_article() is prefered,
but it is from util.sl and mostly all it does is the scroll_dn so I used
that directly rather than introduce util.sl dependencies.

sdb

-- 
 | Sylvan Butler | Not speaking for Hewlett-Packard | sbutler-boi.hp.com |
 | Watch out for my e-mail address. Thank UCE.   #### change ^ to @ #### |
    They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety. --Benjamin Franklin, 1759
 "Don't Tread On Me!"

Re: SLRN - minor scrolling oddity/bug/feature
#54817
Author: Chris Green
Date: Fri, 03 Dec 1999 00:00
25 lines
2017 bytes
On 2 Dec 1999 21:41:47 GMT, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu> wrote:
>Chris Green wrote:
>> The basic problem is that slrn doesn't differentiate between viewing an
>> article and viewing the article list.
>
>How does is_article_visible() not do this?  You can tell whether you're not
>seeing the article at all, seeing the article being pointed to by the cursor
>and seeing an article not being pointed to by the cursor and, of course, not
>in article mode (which you don't really need this for to begin with).

Yes, you can differentiate with is_article_visible() but this doesn't
help when calling article_linedn.

Since article_linedn is a 'built in' function you can't change what it
does according to what is_article_visible() reports, this is what I
was trying to say.  article_linedn has to try and work out what to do
without a proper difference in mode between viewing an article and
viewing the article list.  It certainly seems to get it wrong anyway
as when one is viewing an article it doesn't always scroll down the
article.

-- 
Chris Green (chris@x-1.net)

Re: SLRN - minor scrolling oddity/bug/feature
#54833
Author: Dawn Owens-Nicholson
Date: Fri, 03 Dec 1999 00:00
19 lines
1862 bytes
All that aside, I think I've got 90% of a solution.  The main difference
between the way you're doing what you want now and the way I've chosen to do
it is the number of keystrokes you use.  You use two -- one to pick which
article to read and begin reading it (TAB, if I recall correctly) and
another (probably SPACE) to page through that article.  I've chosen to try
doing this all with one key (SPACE) because I think it's easier to use.

Is any of this what tin does?  I haven't used tin in a long time and I don't
recall reading about this whole full-time collapsed thread business in the
tin manpage.

I admit, I still don't see the big attraction to keeping threads collapsed
all the time nor do I think a macro is the best way to go about doing this
consistently (macros are handy for testing things like this, but sometimes
they get in the way because they're hard to merge ad-hoc with other macros).
I think, in the end, you'll find that it's sometimes best to change your
views to match that which your software does well.

Re: SLRN - minor scrolling oddity/bug/feature
#54915
Author: Dawn Owens-Nicholson
Date: Mon, 06 Dec 1999 00:00
42 lines
2852 bytes
I'm not sure what the point of this is anymore--in
<slrn849rh0.gat.cgreen@shell.x-1.net> you appear to be fine with using
zoomed mode all the time.  In <slrn83t7kr.s70.cgreen@shell.x-1.net> you
found a way to read news with always-collapsed threads.  So, what's the
point?  It seems like there are two satisfactory methods to read news the
way you want with slrn.

Chris Green wrote:
>     I can't see the subject as it's disappeared off the top

When an article is visible the visible article's subject is always on the
line above the status line, even if you have the article zoomed.  In zoom
mode it is also seen on the status line (as well as a little info about that
article's position within its thread).

>     I can't see previous and subsequent thread's subjects

From previous articles it looks like you've found a way to get this by
reading news with collapsed threads all the time.

>     All I can see is a jagged row of '>' characters

Then you should consult your terminal specifics because you should get an
easily read thread tree.  Alternatively you can set simulate_graphic_chars
to 1 in your slrnrc to get the same map with ASCII characters.

> I think also that there is a genuine bug in the article_linedn built-in,
> it *doesn't* always move to the next line in a displayed article.

In <slrn84d5t3.lns.cgreen@shell.x-1.net> you said:

> If you execute the article_linedn when the thread is collapsed the effect
> is to take you back to the top of the first article in the thread.  This is
> the bug/feature I was complaining about, article_linedn *doesn't* always
> move a line down in an article.

I don't think this is a bug because this is consistent with scroll_dn (and
other intrinsics) in the same situation.  The article at the cursor changes
when you go from an article inside a thread to collapsing that thread.  This
might not be like tin but since slrn isn't tin, that hardly matters.

Re: SLRN - minor scrolling oddity/bug/feature
#54921
Author: Chris Green
Date: Mon, 06 Dec 1999 00:00
53 lines
3572 bytes
On 6 Dec 1999 19:35:27 GMT, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu> wrote:
>I'm not sure what the point of this is anymore--in
><slrn849rh0.gat.cgreen@shell.x-1.net> you appear to be fine with using
>zoomed mode all the time.  In <slrn83t7kr.s70.cgreen@shell.x-1.net> you
>found a way to read news with always-collapsed threads.  So, what's the
>point?  It seems like there are two satisfactory methods to read news the
>way you want with slrn.
>
The zoomed mode is reasonably satisfactory and it's what I'm using
now.  The other method *doesn't* work totally satisfatorily because of
the bug/feature (whatever you like to call it) in article_linedn.

>Chris Green wrote:
>>     I can't see the subject as it's disappeared off the top
>
>>     All I can see is a jagged row of '>' characters
>
>Then you should consult your terminal specifics because you should get an
>easily read thread tree.  Alternatively you can set simulate_graphic_chars
>to 1 in your slrnrc to get the same map with ASCII characters.

It depends where I am actually, here on my PC running an X server the
threads are shown correctly but I still don't see that it tells me
anything I want to know.  I had realised that the display of >
characters only was an idiosyncracy of my display but I could (if I
wanted) follow the thread with it anyway.  It is, however, just wasted
space if you don;t want to see the thread mapping.

>
>> I think also that there is a genuine bug in the article_linedn built-in,
>> it *doesn't* always move to the next line in a displayed article.
>
>In <slrn84d5t3.lns.cgreen@shell.x-1.net> you said:
>
>> If you execute the article_linedn when the thread is collapsed the effect
>> is to take you back to the top of the first article in the thread.  This is
>> the bug/feature I was complaining about, article_linedn *doesn't* always
>> move a line down in an article.
>
>I don't think this is a bug because this is consistent with scroll_dn (and
>other intrinsics) in the same situation.  The article at the cursor changes
>when you go from an article inside a thread to collapsing that thread.  This
>might not be like tin but since slrn isn't tin, that hardly matters.

OK, so it's a 'feature'!  :-)  However there should really be a way to
scroll down one line in a displayed article shouldn't there?  As
things are at the moment you can have an article displayed and have
*no* way to scroll down in it.

-- 
Chris Green (chris@x-1.net)

Re: SLRN - minor scrolling oddity/bug/feature
#54925
Author: Chris Green
Date: Mon, 06 Dec 1999 00:00
43 lines
2935 bytes
On 3 Dec 1999 20:45:07 GMT, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu> wrote:
>All that aside, I think I've got 90% of a solution.  The main difference
>between the way you're doing what you want now and the way I've chosen to do
>it is the number of keystrokes you use.  You use two -- one to pick which
>article to read and begin reading it (TAB, if I recall correctly) and
>another (probably SPACE) to page through that article.  I've chosen to try
>doing this all with one key (SPACE) because I think it's easier to use.
>
I'd be quite happy to use the same key all the time, it doesn't matter
too much whether it's TAB or space, I can re-learn that much!  :-)

The problem is that in most of the newsgroups I seem to frequent the
uncollapsed thread often simply means that:-
    I can't see the subject as it's disappeared off the top
    I can't see previous and subsequent thread's subjects
    All I can see is a jagged row of '>' characters

To my mind this adds absolutely nothing to my reading of the messages and
I'd like to get rid of it, that's all.


>Is any of this what tin does?  I haven't used tin in a long time and I don't
>recall reading about this whole full-time collapsed thread business in the
>tin manpage.
>
I'm a convert from tin I must admit.  tin separates group index,
article index and article view modes.  If you want threads expanded
you have them expanded, if not you don't, but this has no bearing at
all on the article viewing mode.


>I think, in the end, you'll find that it's sometimes best to change your
>views to match that which your software does well.

I agree, but I do think there is a place for requests to change how
something works to accomodate more users' ways of working.  I think
also that there is a genuine bug in the article_linedn built-in, it
*doesn't* always move to the next line in a displayed article.

-- 
Chris Green (chris@x-1.net)

Re: SLRN - minor scrolling oddity/bug/feature
#54953
Author: Dawn Owens-Nicholson
Date: Tue, 07 Dec 1999 00:00
21 lines
2012 bytes
Chris Green wrote:
> The other method *doesn't* work totally satisfatorily because of
> the bug/feature (whatever you like to call it) in article_linedn.

It's not "whatever I like to call it" it's consistent with the other
intrinsics and I haven't seen any documentation suggesting it work any other
way.  It might be inconvenient for you, but that's not enough to call it a
bug.

> However there should really be a way to scroll down one line in a
> displayed article shouldn't there?  As things are at the moment you can have
> an article displayed and have *no* way to scroll down in it.

That's not true--there is a way to scroll within an article.  You have to do
more in your program than you're currently doing, but it's not impossible.
Try keeping track of the article you want to scroll around in, going to that
article and doing stuff then restoring whatever state you unset to get there
(just like what I mentioned before).  It's not a big deal that slrn and tin
don't treat a collapsed thread the same way.

Re: SLRN - minor scrolling oddity/bug/feature
#54961
Author: Sylvan Butler
Date: Tue, 07 Dec 1999 00:00
43 lines
2580 bytes
On 6 Dec 1999 21:45:51 GMT, Chris Green <cgreen@shell.x-1.net> wrote:
>scroll down one line in a displayed article shouldn't there?  As
>things are at the moment you can have an article displayed and have
>*no* way to scroll down in it.

This works for me.  I've never noticed a problem:

===============================
define tin_article_down ()
{
   if (is_article_visible ())
     {
        call ("article_linedn");    % spirit of tin anyway  ;)
     }
   else
     {
        ERROR_BLOCK
          {
             _clear_error ();
             header_bob ();
          }
        call ("down");
        return;
     }
}
definekey ("tin_article_down","j","article");
definekey ("tin_article_down","\e[B","article"); % down arrow
definekey ("tin_article_down","\eOB","article"); % down arrow
===============================

(The version of tin I used didn't actually have this feature when
viewing an article, but I often wished it did.)

sdb

-- 
 | Sylvan Butler | Not speaking for Hewlett-Packard | sbutler-boi.hp.com |
 | Watch out for my e-mail address. Thank UCE.   #### change ^ to @ #### |
    They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety. --Benjamin Franklin, 1759
 "Don't Tread On Me!"

Re: SLRN - minor scrolling oddity/bug/feature
#54986
Author: Chris Green
Date: Wed, 08 Dec 1999 00:00
39 lines
2885 bytes
On 7 Dec 1999 18:44:00 GMT, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu> wrote:
>Chris Green wrote:
>> The other method *doesn't* work totally satisfatorily because of
>> the bug/feature (whatever you like to call it) in article_linedn.
>
>It's not "whatever I like to call it" it's consistent with the other
>intrinsics and I haven't seen any documentation suggesting it work any other
>way.  It might be inconvenient for you, but that's not enough to call it a
>bug.
>
Well, except that one would normally expect to be able to scroll down
in a displayed article and one can't in this particular case.

>> However there should really be a way to scroll down one line in a
>> displayed article shouldn't there?  As things are at the moment you can have
>> an article displayed and have *no* way to scroll down in it.
>
>That's not true--there is a way to scroll within an article.  You have to do
>more in your program than you're currently doing, but it's not impossible.
>Try keeping track of the article you want to scroll around in, going to that
>article and doing stuff then restoring whatever state you unset to get there
>(just like what I mentioned before).  It's not a big deal that slrn and tin
>don't treat a collapsed thread the same way.

Well I can't see how it's done (whether using a 'program' or not), any
help would be most welcome.

I am displaying the first screeful of an article in a collapsed thread,
the article is more than one screenful long, how do I get to the rest
of the article?

This is all I want to do, it hardly seems an unusual requirement.  It
may be that I have missed something obvious, I'm not an experienced
slrn user.

-- 
Chris Green (chris@x-1.net)

Re: SLRN - minor scrolling oddity/bug/feature
#54987
Author: Chris Green
Date: Wed, 08 Dec 1999 00:00
42 lines
2532 bytes
On 7 Dec 1999 18:28:52 GMT, Sylvan Butler <nospam+_no_Zs__9912@hpb13799z.zboi.hpz.com.invalid> wrote:
>On 6 Dec 1999 21:45:51 GMT, Chris Green <cgreen@shell.x-1.net> wrote:
>>scroll down one line in a displayed article shouldn't there?  As
>>things are at the moment you can have an article displayed and have
>>*no* way to scroll down in it.
>
>This works for me.  I've never noticed a problem:
>
>===============================
>define tin_article_down ()
>{
>   if (is_article_visible ())
>     {
>        call ("article_linedn");    % spirit of tin anyway  ;)
>     }
>   else
>     {
>        ERROR_BLOCK
>          {
>             _clear_error ();
>             header_bob ();
>          }
>        call ("down");
>        return;
>     }
>}
>definekey ("tin_article_down","j","article");
>definekey ("tin_article_down","\e[B","article"); % down arrow
>definekey ("tin_article_down","\eOB","article"); % down arrow

I think you'll find the above fails if you have the thread collapsed
(which is where we came in!).  If you execute article_linedn in an
article which is displayed but with the thread collapsed you get taken
back to the start of the first article in the thread.

I don't really see what the above tin_article_down macro adds to what
you can do in 'native' slrn.

-- 
Chris Green (chris@x-1.net)

Re: SLRN - minor scrolling oddity/bug/feature
#55031
Author: Sylvan Butler
Date: Thu, 09 Dec 1999 00:00
32 lines
2672 bytes
On 8 Dec 1999 09:53:09 GMT, Chris Green <cgreen@shell.x-1.net> wrote:
>I think you'll find the above fails if you have the thread collapsed

Who knows...  Or cares.  I run 'zoomed'.

I'd bet you could test the return value from is_article_visible to
determine which header was selected.  When the headers are collapsed the
return is probably 1 because the current header doesn't refer to the
current article.  (I wonder if 2 is ever possible...)

If you get a 1 (2?) from is_article_visible then you would expand
headers and do a header down until you found the correct header and then
do an article line down and collapse the headers again.  Probably too
slow...

>I don't really see what the above tin_article_down macro adds to what
>you can do in 'native' slrn.

When viewing headers it wraps around from bottom to top (a
corresponding 'up' does the reverse) just like tin.

When viewing articles it just scrolls down, just like tin.

sdb
-- 
 | Sylvan Butler | Not speaking for Hewlett-Packard | sbutler-boi.hp.com |
 | Watch out for my e-mail address. Thank UCE.   #### change ^ to @ #### |
    They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety. --Benjamin Franklin, 1759
 "Don't Tread On Me!"

Re: SLRN - minor scrolling oddity/bug/feature
#55035
Author: Sylvan Butler
Date: Thu, 09 Dec 1999 00:00
20 lines
2134 bytes
On 8 Dec 1999 10:00:01 GMT, Chris Green <cgreen@shell.x-1.net> wrote:
>I am displaying the first screeful of an article in a collapsed thread,

How do you know?  I thought you were now running zoomed as well.

>This is all I want to do, it hardly seems an unusual requirement.  It

Sure it does.  The 'collapsed thread' business is very unusual.
Everybody else either wants the thread expanded or they expand or zoom
the article window.

sdb
-- 
 | Sylvan Butler | Not speaking for Hewlett-Packard | sbutler-boi.hp.com |
 | Watch out for my e-mail address. Thank UCE.   #### change ^ to @ #### |
    They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety. --Benjamin Franklin, 1759
 "Don't Tread On Me!"

Re: SLRN - minor scrolling oddity/bug/feature
#55038
Author: Stephane Gibier
Date: Thu, 09 Dec 1999 00:00
80 lines
3396 bytes
I have defined several macros to scroll down/up articles and headers
with the same keys on different contexts. The main problem is that slrn
does not separate header and article mode. This is a well-known feature
submited to Sven's whislist.

The following macros will be able to scroll article body with arrow
keys. When the headers are displayed (H key by default), you can move
the current header with the same keys.

% SmartUp : [Up arrow]
define article_smartup()
{
   if( is_article_visible()  )
      call( "article_lineup" );
   else
      call( "up" );
}
definekey( "article_smartup", "\e[A", "article" );

% SmartDown : [Down arrow]
define article_smartdn()
{
   if( is_article_visible() )
      call( "article_linedn" );
   else
      call( "down" );
}
definekey( "article_smartdn", "\e[B", "article" );

% SmartPageUp : [PageUp arrow]
define article_smartpgup()
{
   if( is_article_visible() )
      call( "article_pageup" );
   else
      call( "pageup" );
}
definekey( "article_smartpgup", "\e[5~", "article" );

% SmartPageDown : [PageDown arrow]
define article_smartpgdn()
{
   if( is_article_visible() )
      call( "article_pagedn" );
   else
      call( "pagedn" );
}
definekey( "article_smartpgdn", "\e[6~", "article" );

% SmartHome : [Home key]
define article_smartbob()
{
   if( is_article_visible() )
      call( "article_bob" );
   else
      call( "header_bob" );
}
definekey( "article_smartbob", "\e[1~", "article" );
definekey( "article_smartbob", "\e[7~", "article" );

% SmartEnd : [End Key]
define article_smarteob()
{
   if( is_article_visible() )
      call( "article_eob" );
   else
      call( "header_eob" );
}
definekey( "article_smarteob", "\e[4~", "article" );
definekey( "article_smarteob", "\e[8~", "article" );

Note: all keys are PC (sort of VT220) compatible, so adjust them on your
VT configuration.

-- 
St�phane Gibier <sgibier@mail.dotcom.fr>
Le rabbin r�servait au s�nateur une belle collection de piques
Yr enoova e�freinvg nh f�pngrhe har oryyr pbyyrpgvba qr cvarf 

Re: [slrn] Distinguishing between header versus article mode
#55073
Author: Chris Green
Date: Fri, 10 Dec 1999 00:00
19 lines
1987 bytes
On 10 Dec 1999 07:41:48 GMT, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu> wrote:
>Stephane Gibier wrote:
>> The main problem is that slrn does not separate header and article mode.
>
>What, exactly, are you looking for in this distinction that isn't supplied
>by is_article_visible()?
>
A method that allows the article to be scrolled correctly, and article
may be visible but article_dn will still not scroll down the article
correctly.

One needs a means (the obvious one being a different mode for article
viewing and article index viewing) to differentiate between a command
which moves down the list and one which moves down the article.

-- 
Chris Green (chris@x-1.net)

[slrn] Distinguishing between header versus article mode
#55077
Author: Dawn Owens-Nicholson
Date: Fri, 10 Dec 1999 00:00
84 lines
5006 bytes
Stephane Gibier wrote:
> The main problem is that slrn does not separate header and article mode.

What, exactly, are you looking for in this distinction that isn't supplied
by is_article_visible()?

> [ed. note: I've edited the quote slightly to conserve vertical space.]
> % SmartUp : [Up arrow]
> define article_smartup()
> {
>    if( is_article_visible()  ) call( "article_lineup" );
>    else call( "up" );
> }
> definekey( "article_smartup", "\e[A", "article" );

[You like "smart" programs, eh?]

I'm pretty sure this is not what you intended--it looks like you wanted to
say "If *any* article is visible, the up arrow key scrolls the article body
up, otherwise the cursor moves up one entry in the header list".  What
you've got will only do the first half of this if the cursor is on the
article being shown (i.e., is_article_visible() returns 3).  If the cursor
is on an article not being shown (is_article_visible() returns 1), you'll
bump into the action another poster complains about--call("article_lineup")
will download the the article at the cursor and show it to you (probably not
what you wanted to do *in this case*).  I think you should change your code
to read:

    if( is_article_visible() == 3 ) call( "article_lineup" );

so you only scroll the article body when the cursor is at the current
article.  This will make for a weird action if you are looking at an article
in the middle of the header list and you move the cursor to the bottom of
the header list and hold down the up arrow key--the cursor will move up
until it hits the article being shown then the *article* will scroll up.
But it's a lot simpler than one alternative I'll describe below:

  implements ("my");
  private variable current_article = NULL;
  static define article_smartup ()
  {
     switch (is_article_visible ())
       { case (0):                               % NO article is visible
	  call ("up");
	  return ();
       }
       { case (1):                               % DIFFERENT article is visible
	  if (current_article == NULL) return ();
%	  variable cursor = extract_article_header ("Message-ID");
	  () = locate_header_by_msgid (current_article, 0);
	  call ("article_lineup");
%	  () = locate_header_by_msgid (cursor, 0);
       }
       { case (3):                               % CURRENT article is visible
	  current_article = extract_article_header ("Message-ID");
	  call ("article_lineup");
       }
  }

  static define group_mode_hook () { current_article = NULL; }

I'll let you replicate this for the other movement commands, but you can see
what happens in each of the three possible cases in article mode.  Add
my->group_mode_hook() to your global group_mode_hook() so the current
article pointer gets updated properly when you leave article mode.  Also,
you'll need to update my->current_article for reading articles and any other
action where the cursor moves from one article to another (this is quite a
lot of intrinsic wrapping to do).  Personally, I don't think it's really
worth being able to make the arrow/home/end/etc. keys do the right thing no
matter where the cursor is. 

Please note--there is a bug preventing this macro from doing all I wanted it
to do.  I wanted the cursor to move to the article you *intended* to scroll
up, perform the scroll, then move back to where it was when you ran
article_smartup()[1].  You can see I try to do that with the two commented out
lines.  If you uncomment them it won't do what you expect; I'm speculating
there's some sort of cursor movement optimization going on that prevents
doing certain actions quickly.  This does something fairly close to what I
think you intended to do.  Let the flaming begin.

[1] If I get some time, I'll work on a workaround and a thread-display
    preserving version that'll look much more "smart".

Re: [slrn] Distinguishing between header versus article mode
#55089
Author: Dawn Owens-Nicholson
Date: Fri, 10 Dec 1999 00:00
24 lines
2346 bytes
Chris Green wrote:
> A method that allows the article to be scrolled correctly, and article
> may be visible but article_dn will still not scroll down the article
> correctly.

Or maybe the intrinsics work fine as far as this goes and it's you who
doesn't know how to use them.  You should study the code and text I posted
in <slrn851bl9.t3j.bluemoon@ux6.cso.uiuc.edu> which clearly illustrate how
to keep track of what article to scroll.  Also, please read
<slrn84tbe0.n0u.bluemoon@ux6.cso.uiuc.edu>.  It too clears up the one major
point that you apparently refuse to want to understand.

> One needs a means (the obvious one being a different mode for article
> viewing and article index viewing) to differentiate between a command
> which moves down the list and one which moves down the article.

...aside from the 4 ways to move the cursor up and down the header list that
have no side effects whatsoever and the various ways to scroll the article
around?  It's a shame you don't read articles completely:
locate_header_by_msgid() and variables are the key to getting what you want.

But if you really just want tin, use tin.

Re: [slrn] Distinguishing between header versus article mode
#55188
Author: Dawn Owens-Nicholson
Date: Mon, 13 Dec 1999 00:00
85 lines
4618 bytes
Chris Green wrote:
>     Gets the article I'm viewing (not sure if this is necessary)
>     Switches from collapsed threads back to uncollapsed threads
>     Makes sure the article is visible
>     Scrolls down one line in the article
>     Switches back to collapsed threads
>     Makes sure the article is visible

What happened when you tested this out by making your own article_linedn
replacement macro (or, if you prefer patch for slrn) that follows this
logic?

> However there are some difficulties with this:-

So code something up and test it out--experiment!  All the time you've spent
writing articles in this thread could have been spent solving your own
problem.

> I *still* think it would be a useful addition to slrn to have a
> 'primitive' which simple scrolls down one line in an article.

So make one!  You've got slrn source (if you want your changes to be in C)
or you could make a macro that does it.  I'll get you started with a macro:

  !if (is_article_visible ()) return ();
  variable current_article = extract_article_header ("Message-ID");
  if (locate_header_by_msgid (scroll_down_article, 0))
    {
       call ("article_linedn");
       () = locate_header_by_msgid (current_article, 0);
    }

Feel free to bullet-proof that snippet and build it into a complete macro.
Play around with things and have fun!

> The article_dn command does much more than this (take a look at the code,
> it's quite complex).  I can't believe that the addition of a new
> command is that difficult and it would be helpful to a number of
> people (me included!).

Okay, you can't believe it's that hard to add a new command, so add one!

In <slrn852b6r.rt1.cgreen@shell.x-1.net> you said:
> One needs a means (THE OBVIOUS ONE BEING A DIFFERENT MODE FOR ARTICLE
> VIEWING AND ARTICLE INDEX VIEWING) to differentiate between a command
> which moves down the list and one which moves down the article.

The emphasis is mine. Given the above request it is plain to see you weren't
aware of all is_article_visible() can do for you.

I responded and in <slrn859i52.l03.cgreen@shell.x-1.net> you said:
> I don't have any problems moving around in the header list and I never
> have done.  I've never said anything about this at all so I don't
> really understand why you're telling me this.

Then I'll say it another way: slrn's is_article_visible() already
distinguishes between these two states in article mode, but I'll throw in
is_group_mode() so we're not thinking myopically.  The latter two conditions
use the terminology you used in <slrn852b6r.rt1.cgreen@shell.x-1.net>:

  if (is_group_mode ())
    {
       % In group mode.
    }
  else if (is_article_visible ())
    {
       % In article viewing mode.
    }
  else
    {
       % In article index mode.
    }

is_article_visible() is darn handy!

> Other people seem to have similar problems/misunderstandings with
> regard to the article versus article header display non-modes.

Maybe those other people need to use is_article_visible()?  I don't recall
anyone else asking and I doubt there's many people, but it's your time and
effort we're talking about--so feel free to help them out by designing the
change, coding it and debugging it.  I'm sure they'd appreciate a ready-made
solution.

Re: [slrn] Distinguishing between header versus article mode
#55207
Author: Chris Green
Date: Mon, 13 Dec 1999 00:00
66 lines
4311 bytes
On 10 Dec 1999 19:17:13 GMT, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu> wrote:
>Chris Green wrote:
>> A method that allows the article to be scrolled correctly, and article
>> may be visible but article_dn will still not scroll down the article
>> correctly.
>
>Or maybe the intrinsics work fine as far as this goes and it's you who
>doesn't know how to use them.  You should study the code and text I posted
>in <slrn851bl9.t3j.bluemoon@ux6.cso.uiuc.edu> which clearly illustrate how
>to keep track of what article to scroll.  Also, please read
><slrn84tbe0.n0u.bluemoon@ux6.cso.uiuc.edu>.  It too clears up the one major
>point that you apparently refuse to want to understand.
>
I did read that.  OK, so I could execute a long and convoluted piece
piece of code which:-

    Gets the article I'm viewing (not sure if this is necessary)
    Switches from collapsed threads back to uncollapsed threads
    Makes sure the article is visible
    Scrolls down one line in the article
    Switches back to collapsed threads
    Makes sure the article is visible
    
However there are some difficulties with this:-
    Over a slow[ish] line it might be unacceptably slow as the screen
will be redisplayed a number of times.
    The change of viewing window size may (or may not) confuse things
somewhat.
    It's a horribly messy approach to the simple requirement of
scrolling down one line.


I *still* think it would be a useful addition to slrn to have a
'primitive' which simple scrolls down one line in an article.  The
article_dn command does much more than this (take a look at the code,
it's quite complex).  I can't believe that the addition of a new
command is that difficult and it would be helpful to a number of
people (me included!).

>> One needs a means (the obvious one being a different mode for article
>> viewing and article index viewing) to differentiate between a command
>> which moves down the list and one which moves down the article.
>
>...aside from the 4 ways to move the cursor up and down the header list that
>have no side effects whatsoever and the various ways to scroll the article
>around?  It's a shame you don't read articles completely:
>locate_header_by_msgid() and variables are the key to getting what you want.
>
I don't have any problems moving around in the header list and I never
have done.  I've never said anything about this at all so I don't
really understand why you're telling me this.

Other people seem to have similar problems/misunderstandings with
regard to the article versus article header display non-modes.

I'm not trying to be nasty about slrn, I'm just trying to use the
program and find this particular quirk difficult to work around, as do
other people.

And please add a smile to all this, I'm happy with slrn as it is, I
just want to help with ideas to make it better.

-- 
Chris Green (chris@x-1.net)

Re: [slrn] Distinguishing between header versus article mode
#55233
Author: Dawn Owens-Nicholson
Date: Tue, 14 Dec 1999 00:00
105 lines
7190 bytes
I wrote:
>  !if (is_article_visible ()) return ();
>  variable current_article = extract_article_header ("Message-ID");
>  if (locate_header_by_msgid (scroll_down_article, 0))
>    {
>       call ("article_linedn");
>       () = locate_header_by_msgid (current_article, 0);
>    }

Chris Green wrote:
> But this still misses the point, call ("article_linedn") *doesn't*
> scroll one line down in the article, even when wrapped up in
> is_article_visible() tests.

It's not wrapped in is_article_visible() tests, it's wrapped in a
locate_header_by_msgid() which puts the cursor at a different article.
There's a big difference.

> I have tried the above snippet of code, bound to the 'n' key.

Please post the code you wrote which incorporates the above snippet.

> If you hit 'n' when in a collapsed thread that is more than one page long
> then you *still* get dropped back to the first message in the thread.

Of course--clearly the snippet isn't meant to handle collapsed threads in
the way you wanted.  There is no code in the snippet which deals explicitly
with collapsing or uncollapsing any thread.  Like I said before, this is to
*get you started*. It's not a complete solution all written and handed to
you ready-to-go.  It's expected that you will put work into figuring out
what the snippet does (and how) and use that knowledge to make your own
macro or C code.

> The whole problem is that the logic of article_linedn in slrn's C code
> is such that it *doesn't* just attempt to scroll down one line in an
> article.  It has to *decide for itself* whether slrn is showing an
> article or the article list or what.  Then if it thinks an article is
> being displayed it scrolls down one line.

Wrong.  The problem for you is you're not setting slrn's cursor to the right
place so article_linedn does what you want it to do (this means
programmatically determining where the cursor has to be).  As for the logic
of article_linedn, you've got that wrong too.  In article mode only, IF THE
VISIBLE ARTICLE IS THE ARTICLE BEING POINTED TO BY THE CURSOR,
article_linedn does precisely what you want--the visible article is scrolled
one line down. Otherwise, there is either NO ARTICLE VISIBLE or THE CURSOR
IS NOT POINTING TO THE VISIBLE ARTICLE.  In either of the latter two cases,
article_linedn causes slrn to possibly download the article and show it to
you (no scrolling happens if the article was downloaded otherwise the cached
article is unhidden and scrolled down one line).  Readers who are paying
attention will notice how the three cases in all caps map precisely to the
output of is_article_visible().

> Unfortunately the tests in slrn's C code don't work exactly the same as
> is_article_visible() does and, if the thread is collapsed, the C code
> doesn't make the right decision.  This is why I think it's actually a bug,
> it's just rather an abstruse bug.  I can't imagine any reason why one would
> want the article_linedn command to do what it does do in this particular
> case.

You're confusing yourself by thinking about collapsed threads--in slrn,
uncollapsing threads and collapsing threads have an indirect relationship
with scrolling an article one line down.  When threads are collapsed the
interior articles are *completely inaccessible* to the cursor.  This is not
a bug, it was intentionally designed this way.  To make them accessible one
must first uncollapse the thread to get to them either explicitly (with
uncollapse_threads() or uncollapse_all_threads()) or implicitly (by going to
an article inside the collapsed thread--a variety of intrinsic and S-Lang
functions will do this including scroll_dn and locate_header_by_msgid()).

We want this to be the way it is because reading news interactively gets the
highest priority.  The way things work now is how one expects them to work
when reading news without macros.  Macro coders are expected to bend over
backwards a little bit to get what they want.  This is not a hassle or a
problem for you because all the functions you need to get the job done are
in slrn's S-Lang API.

I'll explain another way, when people read news they only care about where
the cursor is when they want to tell slrn "I want to skip to *this* article
now.".  Otherwise, they let the cursor go wherever it has to go to let them
read new news.  Therefore, cursor-centric commands work best for interactive
use.  Macro writers know this from way back before you ever got involved
with slrn.  Macro writers also know that keeping track of where the cursor
should go and tracking the collapsed state of threads is part of the job of
writing well-behaved macros.

> OK, so if I want to change the C code in slrn I can probably get what
> I want, but I don't think it's seriously possible at all using macros
> because the underlying article_linedn code can't be 'forced' to just
> scroll down one line in an article.

So, in other words, you don't *know* if what you want can be done (just like
you didn't know what shortcomings exist using a macro with respect to
redrawing the screen) but it's easier to publicly postulate and complain
then it is to experiment, learn and write code.  You spend more time talking
about your problems than doing something about them.  You don't post the
S-Lang code you say you ran to incorporate the snippet I provided, you
haven't make any patches available to alter slrn to do what you want it to
do and you complain a lot about how slrn is broken in this respect.  I think
you want someone else to fix your problem for you; prove to you that what
you want can be done by posting a ready-made solution but you won't come out
and ask for it because that would make it obvious you aren't willing to put
time into your own problem.

Re: [slrn] Distinguishing between header versus article mode
#55252
Author: Chris Green
Date: Tue, 14 Dec 1999 00:00
43 lines
3460 bytes
On 13 Dec 1999 23:59:25 GMT, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu> wrote:
>So make one!  You've got slrn source (if you want your changes to be in C)
>or you could make a macro that does it.  I'll get you started with a macro:
>
>  !if (is_article_visible ()) return ();
>  variable current_article = extract_article_header ("Message-ID");
>  if (locate_header_by_msgid (scroll_down_article, 0))
>    {
>       call ("article_linedn");
>       () = locate_header_by_msgid (current_article, 0);
>    }
>
>Feel free to bullet-proof that snippet and build it into a complete macro.
>Play around with things and have fun!

But this still misses the point, call ("article_linedn") *doesn't*
scroll one line down in the article, even when wrapped up in
is_article_visible() tests.

I have tried the above snippet of code, bound to the 'n' key.  If you
hit 'n' when in a collapsed thread that is more than one page long
then you *still* get dropped back to the first message in the thread.

The whole problem is that the logic of article_linedn in slrn's C code
is such that it *doesn't* just attempt to scroll down one line in an
article.  It has to *decide for itself* whether slrn is showing an
article or the article list or what.  Then if it thinks an article is
being displayed it scrolls down one line.  Unfortunately the tests in
slrn's C code don't work exactly the same as is_article_visible() does
and, if the thread is collapsed, the C code doesn't make the right
decision.  This is why I think it's actually a bug,  it's just rather
an abstruse bug.  I can't imagine any reason why one would want the
article_linedn command to do what it does do in this particular case.

OK, so if I want to change the C code in slrn I can probably get what
I want, but I don't think it's seriously possible at all using macros
because the underlying article_linedn code can't be 'forced' to just
scroll down one line in an article.

-- 
Chris Green (chris@x-1.net)

Re: [slrn] Distinguishing between header versus article mode
#55259
Author: Sylvan Butler
Date: Tue, 14 Dec 1999 00:00
27 lines
2557 bytes
On 13 Dec 1999 23:59:25 GMT, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu> wrote:
>is_article_visible() is darn handy!

That's for sure.

>Chris Green wrote:
>> Other people seem to have similar problems/misunderstandings with
>> regard to the article versus article header display non-modes.
>
>Maybe those other people need to use is_article_visible()?  I don't recall

Most likely.

>anyone else asking and I doubt there's many people, but it's your time and

As do I.  I've already posted a bit and told him to check out
is_article_visible(), but it seems that post was ignored...

sdb
-- 
 | Sylvan Butler | Not speaking for Hewlett-Packard | sbutler-boi.hp.com |
 | Watch out for my e-mail address. Thank UCE.   #### change ^ to @ #### |
    They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety. --Benjamin Franklin, 1759
 "Don't Tread On Me!"

Re: [slrn] Distinguishing between header versus article mode
#55270
Author: Sylvan Butler
Date: Tue, 14 Dec 1999 00:00
72 lines
4269 bytes
On 14 Dec 1999 12:48:22 GMT, Chris Green <cgreen@shell.x-1.net> wrote:
>On 13 Dec 1999 23:59:25 GMT, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu> wrote:
>>So make one!  You've got slrn source (if you want your changes to be in C)
>>or you could make a macro that does it.  I'll get you started with a macro:
>>
>>  !if (is_article_visible ()) return ();
>>  variable current_article = extract_article_header ("Message-ID");
>>  if (locate_header_by_msgid (scroll_down_article, 0))
>>    {
>>       call ("article_linedn");
>>       () = locate_header_by_msgid (current_article, 0);
>>    }
>>
>>Feel free to bullet-proof that snippet and build it into a complete macro.
>>Play around with things and have fun!
>
>But this still misses the point, call ("article_linedn") *doesn't*

No, it doesn't.

>scroll one line down in the article, even when wrapped up in
>is_article_visible() tests.

Right.  That's why the header selection is in there.

>I have tried the above snippet of code, bound to the 'n' key.  If you
>hit 'n' when in a collapsed thread that is more than one page long
>then you *still* get dropped back to the first message in the thread.

Then add some more around the code that uncollapses the thread first and
collapses it afterwards.

>The whole problem is that the logic of article_linedn in slrn's C code

That does sounds like a problem, but not the whole problem.  Part of the
problem is that you are stuck on what doesn't work instead of trying to
figure out what does work.

>OK, so if I want to change the C code in slrn I can probably get what

Yup.

>I want, but I don't think it's seriously possible at all using macros

Sure it is.  You just need to do it instead of merely complaining.

>because the underlying article_linedn code can't be 'forced' to just
>scroll down one line in an article.

article_linedn() does work in some situations.

The macro solution is then to only call it after you set up one of those
situations.

If you want your macro to be more simple, create another primitive in
'C' that works the way you want.

If you don't want to mess with 'C' and recompilation then do the work
in the macro.

Either way your problem is solveable, if you want to solve it.

sdb

-- 
 | Sylvan Butler | Not speaking for Hewlett-Packard | sbutler-boi.hp.com |
 | Watch out for my e-mail address. Thank UCE.   #### change ^ to @ #### |
    They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety. --Benjamin Franklin, 1759
 "Don't Tread On Me!"

Re: [slrn] Distinguishing between header versus article mode
#55332
Author: Chris Green
Date: Wed, 15 Dec 1999 00:00
65 lines
5099 bytes
>Wrong.  The problem for you is you're not setting slrn's cursor to the right
>place so article_linedn does what you want it to do (this means
>programmatically determining where the cursor has to be).  As for the logic
>of article_linedn, you've got that wrong too.  In article mode only, IF THE
>VISIBLE ARTICLE IS THE ARTICLE BEING POINTED TO BY THE CURSOR,
>article_linedn does precisely what you want--the visible article is scrolled
>one line down. Otherwise, there is either NO ARTICLE VISIBLE or THE CURSOR
>IS NOT POINTING TO THE VISIBLE ARTICLE.  In either of the latter two cases,
>article_linedn causes slrn to possibly download the article and show it to
>you (no scrolling happens if the article was downloaded otherwise the cached
>article is unhidden and scrolled down one line).  Readers who are paying
>attention will notice how the three cases in all caps map precisely to the
>output of is_article_visible().
>
>> Unfortunately the tests in slrn's C code don't work exactly the same as
>> is_article_visible() does and, if the thread is collapsed, the C code
>> doesn't make the right decision.  This is why I think it's actually a bug,
>> it's just rather an abstruse bug.  I can't imagine any reason why one would
>> want the article_linedn command to do what it does do in this particular
>> case.
>
>You're confusing yourself by thinking about collapsed threads--in slrn,
>uncollapsing threads and collapsing threads have an indirect relationship
>with scrolling an article one line down.  When threads are collapsed the
>interior articles are *completely inaccessible* to the cursor.  This is not
>a bug, it was intentionally designed this way.  To make them accessible one
>must first uncollapse the thread to get to them either explicitly (with
>uncollapse_threads() or uncollapse_all_threads()) or implicitly (by going to
>an article inside the collapsed thread--a variety of intrinsic and S-Lang
>functions will do this including scroll_dn and locate_header_by_msgid()).
>
In other words the cursor doesn't point at the article I'm reading
which seems a little odd to me.

However I will take a longer harder look at this (some time), thanks
for all your input.

>> OK, so if I want to change the C code in slrn I can probably get what
>> I want, but I don't think it's seriously possible at all using macros
>> because the underlying article_linedn code can't be 'forced' to just
>> scroll down one line in an article.
>
>So, in other words, you don't *know* if what you want can be done (just like
>you didn't know what shortcomings exist using a macro with respect to
>redrawing the screen) but it's easier to publicly postulate and complain
>then it is to experiment, learn and write code.  You spend more time talking

I spend my whole day writing code, nowadays it's mostly in Java but
for the past twenty years or more I've been a C/C++ programmer.

Of course what I want *can* be done, whether it can be done relatively
simply without completely destroying slrn's innards is another matter.

I was after a simple[ish] way of getting what (still) seems to me to
be a perfectly normal thing to need - a way of scrolling down one line
in an article I'm viewing.  If it's not possible in slrn without a
major hack/re-write then it's probably not worth it.  I also would
prefer the change to either become part of slrn or to be a simple to
add external macro/script, having to re-apply a patch every time slrn
changes can become a chore.

-- 
Chris Green (chris@x-1.net)

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