The intrinsic functions described in this chapter are available in article mode and allow you to manipulate the header window.
Void collapse_thread ()
This function may be used to collapse the current thread.
uncollapse_thread, collapse_threads, is_thread_collapsed
Void collapse_threads ()
This function will collapse all threads in the current newsgroup.
uncollapse_threads
String_Type extract_article_header (String h)
This function returns the article header line specified by the
header keyword h
of the currently selected header. The
currently selected header may correspond to the currently
displayed article. To get a header of the currently displayed
article, use the extract_displayed_article_header
function.
If the header does not exist, it returns the empty string.
This function will not query the server. If you are looking for a non-NOV header which was not stored for expensive scoring, then download the message associated with the current header line.
extract_displayed_article_header, is_article_visible
String_Type extract_displayed_article_header (String h)
This function returns the article header line specified by the
header keyword h
of the currently displayed message.
If the header does not exist, it returns the empty string.
extract_displayed_article_header, is_article_visible
Integer get_grouplens_score ()
This function returns the grouplens score of the current header. If the header has no grouplens score, or if grouplens support has not been enabled, 0 will be returned.
Integer get_header_flags ()
This functions returns the flags for the current header. This integer is a bitmapped value whose bits are defined by the following constants:
HEADER_READ : set if header is marked as read
HEADER_TAGGED : set if header has `*' tag
HEADER_HIGH_SCORE : set if header has high score
HEADER_LOW_SCORE : set if header has low score
set_header_flags
Integer get_header_number ()
This function returns the article number for the current header (i.e. the
one assigned by the server and recorded in the newsrc file). If you want
the current cursor position instead, use header_cursor_pos
.
Integer get_header_score ()
This functions returns the score for the current header.
set_header_score
Integer get_header_tag_number ()
This function returns the value of the numerical tag associated with the current header. If the header has no numerical tag, zero is returned.
String_Type get_visible_headers ()
The get_visible_headers
function returns the list of headers
headers that are to be displayed when an article is viewed. See the
documentation for the set_visible_headers
for the format of
this string.
set_visible_headers, is_article_visible, set_header_display_format
Integer goto_num_tagged_header (Integer n)
This function causes the header with numerical tag n
to become the
current header. It returns 1 upon success or 0 upon failure.
header_down, get_header_flags, call
Integer has_parent ()
Returns 1 if the current header has a parent (within a thread tree), 0 otherwise.
Integer header_cursor_pos ()
This function returns the current position of the cursor in the header
summary window. This is the same as the ``header number'' of the article
that gets displayed if the use_header_numbers
config variable is
turned on, so it is always a number in the range 1 through
SCREEN_HEIGHT
-3; do not confuse it with the article number assigned
by the server (which can be obtained using the intrinsic function
get_header_number
). If the article pager is ``zoomed'', this
function always returns 1.
Integer header_down (Integer n)
The function moves the current position down n
headers. It
returns the number that was actually moved.
header_up
Integer header_next_unread ()
Goto next unread header. When reading from an slrnpull spool, headers for which the article body is not present are skipped. The function returns one upon success or zero upon failure.
header_down
Integer header_up (Integer n)
The function moves the current position up n
headers. It
returns the number that was actually moved.
header_down
Int_Type headers_hidden_mode ()
This function may be used to determine whether or not some headers will be hidden when an article is displayed. It returns 0 is all headers will be displayed, or a non-zero value if some may be hidden.
set_visible_headers, get_visible_headers, is_article_visible
Integer is_thread_collapsed ()
If the current header is the start of a collapsed thread, this function will return a non-zero value. If the thread is expanded, zero will be returned.
collapse_thread
Int_Type locate_header_by_msgid (String_Type msgid, Int_Type qs)
The locate_header_by_msgid
function may be used to set the
current header to one whose message-id is given by msgid
. If
the second parameter qs
is non-zero, then the header will be
retrieved from the server if it is not in the current list of
headers. The function returns 1
if an appropriate header was
found, or 0
otherwise.
One possible use of this function is to mark the current position in the header list and return to that position later, e.g.,
% Save the current position
variable msgid = extract_article_header ("Message-ID");
.
.
% Return to previous position.
() = locate_header_by_msgid (msgid, 0);
Integer next_tagged_header ()
This function moves the current header position to the next *
tagged header. It returns non-zero upon success or zero upon
failure.
prev_tagged_header, goto_num_tagged_header, header_up, header_down
Integer prev_tagged_header ()
This function moves the current header position to the previous `*' tagged header. It returns non-zero upon success or zero upon failure.
next_tagged_header, goto_num_tagged_header, header_up, header_down
Integer re_bsearch_author (String regexp)
Search backward for header whose author matches regular expression
regexp
. If successful, it returns 1 and the current header is set
to the matching header. It returns 0 upon failure.
re_fsearch_author, re_fsearch_subject
Integer re_bsearch_subject (String regexp)
Search backward for header whose subject matches regular expression
regexp
. If successful, it returns 1 and the current header is set
to the matching header. It returns 0 upon failure.
re_fsearch_author, re_bsearch_subject
Integer re_bsearch_author (String regexp)
Search forward for header whose author matches regular expression
regexp
. If successful, it returns 1 and the current header is set
to the matching header. It returns 0 upon failure.
re_bsearch_author, re_fsearch_subject
Integer re_fsearch_subject (String regexp)
Search forward for header whose subject matches regular expression
regexp
. If successful, it returns 1 and the current header is set
to the matching header. It returns 0 upon failure.
re_fsearch_author, re_bsearch_subject
Void set_header_display_format (Int_Type nth, String_Type fmt)
The set_header_display_format
function may be used to set the
nth
header display format to fmt
. One may
interactively toggle between the formats via the
toggle_header_formats
keybinding.
The generic format specifier begins with the %
character and must
be of the form:
%[-][w]x
where the brackets indicate optional items. Here, w is a width
specifier consisting of one or more digits. If the minus sign (-)
is present, the item will be right justified, otherwise it will be
left justified. The item specifier x is required and, depending
on it value, has the following meaning:
s : subject
S : score
r : author real name
f : from header
G : Group lens score
l : Number of lines
n : server number
d : date
t : thread tree
F : flags (read/unread, `*' and `#' tags, header number)
% : percent character
g : goto a specified column
Thus, "%F%-5l:%t%s"
indicates that the header window will contain
the, in order: the flags, the number of lines the article contains
right justified in a 5 character field, a `:', the tree, and the
subject.
The g
format specifier must be preceeded by a number that
indicates the next write should take place at the specified column.
If the column number is negative, then the column is interpreted as
an offset from the right side of the display. For example,
%-24g%f
indicates that then From header is to
be written out 24 columns from the right edge of the window.
set_visible_headers
Void set_header_flags (Integer flags)
This function may be used to set the flags associated with the
currently selected header. See the description for the
get_header_flags
function for more information.
get_header_flags
Void set_header_score (Integer score)
This function may be used to set the score of the current header.
get_header_score
Void set_visible_headers (String_Type header_list)
The set_visible_headers
function may be used to specify the
headers that are displayed when an article is viewed. The string
header_list
specifies a comma separated list of headers to
show.
To show only the From header and headers that start with `X-', use:
set_visible_headers ("X-,From:");
get_visible_headers, headers_hidden_mode, is_article_visible, set_header_display_format
Void sort_by_sorting_method ()
This function sorts the articles in header overview by the current sorting mode.
This is useful if you want to apply changes to sorting_method
:
set_integer_variable("sorting_method", 3);
sort_by_sorting_method ();
Integer thread_size ()
This function returns the number of articles in the current thread or subthread.
Void uncollapse_thread ()
This function may be used to uncollapse the current thread.
thread_size, collapse_thread, is_thread_collapsed
Void uncollapse_threads ()
This function uncollapses all threads. This is usually necessary if you want to use the header movement functions to access hidden headers.
collapse_threads