The intrinsic functions described in this chapter are available in group mode.
String current_newsgroup ()
This function returns the name of the current newsgroup.
server_name
Integer get_group_flags ()
This function returns the flags associated with the current newsgroup. This integer is a bitmapped value whose bits are defined by the following constants:
GROUP_UNSUBSCRIBED : set if the group is unsubscribed
GROUP_NEW_GROUP_FLAG : set if the group is new
get_header_flags, set_group_flags, current_newsgroup
Array_Type get_group_order ()
This function returns an array of strings that contains the names of all known groups in the current order.
This function is only available if slrn was compiled with S-Lang 1.4.x.
set_group_order
Integer group_down_n (Integer n)
This function moves the current group pointer down n
groups and
returns the actual number moved.
group_up_n, group_search, current_newsgroup
Integer group_search (String name)
This function searches for a newsgroup containing the string
name
. It also searches newsgroup descriptions. A non-zero value
is returned upon success or zero upon failure.
This search may wrap.
select_group, current_newsgroup
Integer group_unread ()
This function returns the number of unread articles in the current newsgroup.
select_group, current_newsgroup, is_group_mode
Integer group_up_n (Integer n)
This function moves the current group pointer up n
groups and
returns the actual number moved.
group_down_n, group_search, current_newsgroup
Void hide_current_group ()
Hides the current group in the group window. Hidden groups can be displayed again by calling ``toggle_hidden''.
Integer is_group_mode ()
This function returns non-zero if the current mode is group-mode.
Integer select_group ()
This function may be used to select the current group. It returns 0 upon success or -1 upon failure. It can fail if the group has no articles.
Note that in some situations, this function will set an slang error condition. This includes cases in which the user interrupted transfer of article headers or all articles got killed by the scorefile.
current_newsgroup
Void set_group_display_format (Int_Type nth, String_Type fmt)
This function may be used to set the nth
group display format to
fmt
. One may interactively toggle between the formats via the
toggle_group_formats
keybinding.
The generic format is identical to the one described in
set_header_display_format
. The following descriptors are defined:
F : Group flag (`U' for unsubscribed, `N' for new)
d : Group description (needs to be downloaded once with slrn -d)
g : goto a specified column
h : ``High water mark'' (highest article number in the group)
l : ``Low water mark'' (lowest article number in the group)
n : Group name
t : Total number of articles in the group (estimate)
u : Number of unread articles in the group
Void set_group_flags (Integer flags)
This function may be used to set the flags associated with the current newsgroup.
get_group_flags
Void set_group_order (Array_Type names)
When names
is a one-dimensional array of strings (group names),
slrn will sort the group list into the implied order. Strings that do
not match known groups are ignored; existing groups that are not included
in names
remain in their current (relative) order, but will be
moved to the end of the list.
According to the above rule, it is possible to move a group to the top of
the list by using it as the only element of names
:
set_group_order ("news.software.readers");
Moving a group to the end of the list can be done by removing it from the
list returned by get_group_order and calling set_group_order on the
result.
An example for a simple group sort based on this function can be found in the file gsort.sl that comes with slrn.
This function is only available if slrn was compiled with S-Lang 1.4.x.
get_group_order