1The intrinsic functions described in this chapter are available in group 2mode. 3 4\function{current_newsgroup} 5\usage{String current_newsgroup ()} 6\description 7 This function returns the name of the current newsgroup. 8\seealso{server_name} 9\done 10 11\function{get_group_flags} 12\usage{Integer get_group_flags ()} 13\description 14 This function returns the flags associated with the current 15 newsgroup. This integer is a bitmapped value whose bits are 16 defined by the following constants: 17#v+ 18 GROUP_UNSUBSCRIBED : set if the group is unsubscribed 19 GROUP_NEW_GROUP_FLAG : set if the group is new 20#v- 21\seealso{get_header_flags, set_group_flags, current_newsgroup} 22\done 23 24\function{get_group_order} 25\usage{Array_Type get_group_order ()} 26\description 27 This function returns an array of strings that contains the names of all 28 known groups in the current order. 29\notes 30 This function is only available if slrn was compiled with S-Lang 1.4.x. 31\seealso{set_group_order} 32\done 33 34\function{group_down_n} 35\usage{Integer group_down_n (Integer n)} 36\description 37 This function moves the current group pointer down \var{n} groups and 38 returns the actual number moved. 39\seealso{group_up_n, group_search, current_newsgroup} 40\done 41 42\function{group_search} 43\usage{Integer group_search (String name)} 44\description 45 This function searches for a newsgroup containing the string 46 \var{name}. It also searches newsgroup descriptions. A non-zero value 47 is returned upon success or zero upon failure. 48\notes 49 This search may wrap. 50\seealso{select_group, current_newsgroup} 51\done 52 53\function{group_unread} 54\usage{Integer group_unread ()} 55\description 56 This function returns the number of unread articles in the current 57 newsgroup. 58\seealso{select_group, current_newsgroup, is_group_mode} 59\done 60 61\function{group_up_n} 62\usage{Integer group_up_n (Integer n)} 63\description 64 This function moves the current group pointer up \var{n} groups and 65 returns the actual number moved. 66\seealso{group_down_n, group_search, current_newsgroup} 67\done 68 69\function{hide_current_group} 70\usage{Void hide_current_group ()} 71\description 72 Hides the current group in the group window. Hidden groups can be 73 displayed again by calling ``toggle_hidden''. 74\done 75 76\function{is_group_mode} 77\usage{Integer is_group_mode ()} 78\description 79 This function returns non-zero if the current mode is group-mode. 80\seealso{} 81\done 82 83\function{select_group} 84\usage{Integer select_group ()} 85\description 86 This function may be used to select the current group. It returns 87 0 upon success or -1 upon failure. It can fail if the group has no 88 articles. 89 90 Note that in some situations, this function will set an slang error 91 condition. This includes cases in which the user interrupted transfer of 92 article headers or all articles got killed by the scorefile. 93\seealso{current_newsgroup} 94\done 95 96\function{set_group_display_format} 97\usage{Void set_group_display_format (Int_Type nth, String_Type fmt)} 98\description 99 This function may be used to set the \var{nth} group display format to 100 \var{fmt}. One may interactively toggle between the formats via the 101 \var{toggle_group_formats} keybinding. 102 103 The generic format is identical to the one described in 104 \var{set_header_display_format}. The following descriptors are defined: 105#v+ 106 F : Group flag (`U' for unsubscribed, `N' for new) 107 d : Group description (needs to be downloaded once with slrn -d) 108 g : goto a specified column 109 h : ``High water mark'' (highest article number in the group) 110 l : ``Low water mark'' (lowest article number in the group) 111 n : Group name 112 t : Total number of articles in the group (estimate) 113 u : Number of unread articles in the group 114#v- 115\done 116 117\function{set_group_flags} 118\usage{Void set_group_flags (Integer flags)} 119\description 120 This function may be used to set the flags associated with the 121 current newsgroup. 122\seealso{get_group_flags} 123\done 124 125\function{set_group_order} 126\usage{Void set_group_order (Array_Type names)} 127\description 128 When \var{names} is a one-dimensional array of strings (group names), 129 slrn will sort the group list into the implied order. Strings that do 130 not match known groups are ignored; existing groups that are not included 131 in \var{names} remain in their current (relative) order, but will be 132 moved to the end of the list. 133\example 134 According to the above rule, it is possible to move a group to the top of 135 the list by using it as the only element of \var{names}: 136#v+ 137 set_group_order ("news.software.readers"); 138#v- 139 Moving a group to the end of the list can be done by removing it from the 140 list returned by get_group_order and calling set_group_order on the 141 result. 142 143 An example for a simple group sort based on this function can be found in 144 the file gsort.sl that comes with slrn. 145\notes 146 This function is only available if slrn was compiled with S-Lang 1.4.x. 147\seealso{get_group_order} 148\done 149