Help for Pine - Index Format
The Index-Format variable allows you to decide in which way you will
see the list of messages that belong to a folder in the screen. As we will
see, there are several configuration options that affect the way things
appear in the screen.
If you have never touched your configuration in Pine, the index will
show you information (if available) about each message in the folder. This
information includes among other things, the date in which the message was
sent, the person who sent it, and the subject.
Let us talk about each field in the default configuration of Pine.
is probably one of the most confusing parts about the index. Pine makes an
effort to give you information that could be useful for you. Normally a
message contains two important headers, the and fields. The rule is that Pine will show you the
From field if the message is not from you, and if the above is not
true, the To field.
This sounds very good, there is one problem though.
How does Pine know who you are?
This is the key question. In general, one could say the the answer should
be, by looking at the username that you use to login to the server that
contains your INBOX, and by looking at the user-domain variable.
The above seems to be a good rule, but it is not the end of the story.
What happens if you decide to move your folders to another server? (say
when you change your ISP). In this case, for a folder like sent-mail, Pine
will be unable to determine who you are correctly (because the above stated rule
will probably fail) and it will see a lot of messages from someone who
Pine can not say that it's you. In other words, you will see that the
sent-mail folder in another server will only show the From: field, which
you already know, it's always the same, and this will make distinguishing
between sent messages very difficult, since the index is not showing who the
messages were sent to, but where the message came from.
Therefore, we have transformed the question into, how do I tell Pine who I
am? The answer is that most of the time you don't need to. In the event
that Pine needs to know, because the above rules are failing, you should
use the configuration option. You should
add to that variable any e-mail address that is yours. Note that the
alt-addresses variable is a list of addresses, which means that different
entries must be separated by a comma ",". In order to configure this variable
press M S C and scroll almost to the end. We will refer to this field, by reasons
explained later as the field.
This field shows as much of the subject as it fits in the screen. It is
normally double the size of the FROMORTO field.
If the subject contains characters that are not part of the English
alphabet, and in general that do not belong to the US-ASCII charset, then
the standard says that these characters must be encoded before
being transmitted through the net. This encoding is quite un-intuitive, and
almost impossible to read for humans.
In general when you a message whose subject contains
non US-ASCII characters, Pine encodes this subject using the charset defined in
your variable. For example, if you have set
this variable to be , then the phrase
El Niño, will be encoded as =?iso-8859-1?Q?El_Ni=F1o?=.
On the other hand, when you a message, Pine
will show you the subject in the charset specified in the subject.
Normally, this does not cause any trouble, because you will probably
be sending messages in just one charset, but sometimes, you may receive
messages in some other charset. If the subject is not encoded in the
charset that you specified in the character-set variable, then a warning
will be shown to you in the index, in the form of a string which looks
like preceding the subject. So, for
example, if your character-set variable is set to US-ASCII, then Pine will
display the subject (which is actually encoded in
the message as
Note that it is not guaranteed that you will see the letter
in Nio, since that
depends on what your screen can display, so the warning is there to tell
you that if something appears displayed incorrectly or not displayed at
all, it's because of the strange characters in the subject, and not
because of a bug in Pine.
Finally notice that the same type of encoding can occur in the FROMORTO
field, but because of space constrains, no warning is shown about
characters not in the US-ASCII charset being encoded.
This is a misleading number, but it represents the number of characters in
the message. This includes the headers of the message, and in general
anything included as part of the message. The reason why this is a
misleading number is because attachments do not have the same size when
attached than when they are part of your file system. The reason for this
is that attachments are encoded before they are attached in a standard
called . This encoding usually makes files bigger
in size than what they are.
Incredibly enough, you can configure the way that the size is displayed in
the screen. We will see how to do this later, and there was a change in
the way that this field looks in version 4.40 of Pine, which makes the
field shorter. For some reason, the Pine team decided that this was better.
Maybe you will agree with them.
This represents the date when the message was sent, so if you live in
the US and have a friend living in Australia, it may very well be that you
see the date of tomorrow in your index when reading a message from
your friend. Pine does not do any type of conversion of this date to your
This is the leftmost part of the index, in its leftmost column, you can
see either one of five characters , , ,
or nothing (a space), then you will see another column which
will contain a character or a space, and finally
another column with one of the following letters , ,
, or nothing at all (a space). Let us see what all this means
- means that your address appears in the To: field
of the message. This is an easy way to know which messages were sent to
you as opposed to some distribution lists that you may also be part of.
- means that your address appears in the Cc: field.
This does not happen automatically, and it is certainly not present in versions
previous to 4.40. It must be enabled in the configuration screen, under
. There is another use of this sign, which
is related to the > character which can be seen in the second column, which
we will talk about later.
- means that that message has been selected.
Usually one selects a group of messages in order to make operations on
messages that are tedious to make one by one (e.g. saving a group of
messages to one folder). If you enable the feature
, then Pine will not use
this mark to show which messages are selected, but it will use boldface in the
whole line in the index to show that a message has been selected.
The only exception to the above rule is that Pine will use the mark to show selected messages when you have enabled .
- means that the message is flagged as Important.
The way that this flag is defined in the standard is called
, it does not attach any meaning to the flag.
Therefore regardless of what Pine makes you think, you can use this flag
to denote anything you want.
This flag is, however, special in Pine. The key, when
pressed in the index of the screen, moves you to the next message that is
either New or that it has this flag. You can make Pine skip Important messages when pressing the TAB key, by
enabling . Also, if you
want to flag a message as Important, make sure that you enable the configuration
option , and then press
, when the cursor is on the line that contains that
There is some priority between these characters, which is as follows. If a message
is selected, and the message is not to be shown in boldface, then the
mark is shown. If the mark is not
shown, and the message is flagged important, then the
mark is shown. If the mark is not shown, and your address
appears in the To field, then the mark is shown. If the
mark is not shown, and the message was sent to you
as a copy, then a mark may be shown. If this mark is
not shown, then a blank space is shown in this column.
Now let's talk about the second column of the Status of a message. There
are only two possibilities, there is either a
sign or a space. The appears only if you have
selected the option , and it is used
to indicate the position of the cursor in the index. In the case that the
first column is empty (or there is a space in it), then a dash
is shown in the first column to have the effect of Pine
showing an arrow to indicate the position of the
cursor. Quite nice, I'd say.
Finally, let's talk about the last column in the status field. Here are the
Finally we have the last field,
- means that the message has been marked deleted.
The message has not been removed from the folder, but it may be removed
later. There are two ways to remove the message from the folder. One is by
pressing the command in the index of the folder, or by
closing the folder. If you do not want to be asked for confirmation of
removal of messages from the folder, you should enable both
You can delete a message in several forms. The most direct form is by
pressing the command, either in the index screen or
when reading the message. After you press the key,
Pine advances to the next message (if any), or to the next message that is
not marked deleted if the configuration option is enabled.
Also, by default Pine deletes a message from the current folder when the
message is saved (usually to another folder). If you want to keep
duplicate messages by default, just enable .
If you decide that after all you do not want to remove the message from the
folder, just press , to undelete the message.
- means that the message has been replied, and the
replied message sent. It stands for Answered messages. This flag is
set automatically by Pine, but can also be set manually by the user by
(remember to enable the configuration
before you do this). You can
also unset the answered flag, if present, by giving the command
- means that the message is
. Well, not really. In practice it does not mean
much. A message can have the flag if
- It was not in the folder the last time you closed the folder (this
includes messages that arrive while the folder is opened)
- It was in the folder the last time you closed the folder, but you did
not read it, or
- It was in the folder the last time you closed it, you read it, but you
decided to flag it again, and did not read it again
before you closed the folder.
The problem with Pine is that, although the word is used
for the name of the flag, it's very clear that the name of it has nothing to do
with its meaning.
Throughout the rest of this section I will refer to messages that satisfy
the first condition above as , and to those that
satisfy the other two conditions as (the word
is also used).
The reason why this is confusing is because there are some
configurations that depend on the definition of what a new message is.
For example, the TAB key, in the index screen behaves as follows
- If we press TAB in a folder and there is another New or Unread or
Important message then TAB will put the cursor in that message, unless
the configuration option
, is enabled, in which
case important messages are skipped.
- If we press TAB in an incoming folder and there are no more New, nor
Unread, nor Important messages, then Pine will go to the next incoming
folder and either open it, or offer to open it, if (and only if) there is
at least one New message. Therefore, if you only have Unseen messages in an
incoming folder, then pressing TAB will skip that folder.
You can set the the New flag manually by pressing . Remember
that you need to have enabled the configuration
, in order to make this command
Another example when there is some confusion about what a New message is,
happens when you want to set a filter (or role or score). In this case,
any version previous to 4.50 only handled New messages, now you can
make Pine distinguish between New and Unseen
- If you see a space (or do not see anything in this field), it means that
the message was read during the current session.
There is some priority between these flags which decides which
flag will be shown to you in the index screen. If you delete a message, then
you will see the flag, if the message has not been
marked deleted, but it was answered then you will see the
flag. If the message has not been answered but it
is new or unread, then you will see the flag, and finally
if none of the above applies, then you will see an empty space, which
simply means that the message was read during the current session.
- this field contains a sequential number
that identifies the message inside the folder. This number may be
completely unrelated to the position that the message occupies in the
folder (thinking of the folder as a file). For example, the last message
of a folder appears as the number 1 message when the folder is sorted by
reverse-arrival. There's an internal number, however, called the UID (Unique
Identification Number) of
the message that the server keeps, which never changes, regardless of how many
messages arrive or are expunged from the folder. That number is the one
that the server uses to identify a specific message in the folder.
Configuring the Index-Format
Now that you know what each field means, you may want to have Pine display
either some other type of information or reorganize the way that the index
is displayed in the screen.
The width of the screen determines how much of the index is displayed
in the screen. Some fields have a fixed width, like for example the Status
field, which takes 3 columns, or the date field, which takes 6 columns. Some
others do not have a fixed width, like the Message Number field.
The default algorithm that Pine uses to determine width of each
field, is by first determining the available space. At the beginning this
is the width of the screen, from which we must subtract the width of the
fields that are fixed and the number of spaces in between the fields, then
it is subtracted the width of the maximum message number in the folder
and the width of the maximum size, which in the default configuration of
Pine has a maximum of 6 characters wide. After having subtracted all of
this width, and assuming that we have a positive number the remaining
space is divided in a 2 to 1 proportion, leaving the subject twice as wide
as the FROMORTO field.
In practice this means that the parts of the index that have fixed
width have priority in the display of the screen over those that have
variable width, which you can see if you shrink the width of your screen
to be a very small value. Later on we will talk about how to set width
for each field in the index display.
Setting the Fields in the Index
The way that the index appears on the screen is determined by the value
of the variable. There is extensive help
on how to set this variable, which you can get to by pressing , moving the cursor to this variable and pressing
the key. Therefore I will assume that you will go
and read that information, so that I do not have to rewrite it.
What follows is a brief summary of that information. The index-format
is a line that contains a list of tokens (and their width). All tokens
are written in CAPITAL letters. For example, SUBJECT and DATE are tokens.
You should think of a token as a variable, which is replaced by the value
that represents, so for example SUBJECT is always replaced by the subject
of the message, and DATE by the date it was sent.
If we ignore sizes, then the default configuration of Pine, more or
less is the following:
index-format = STATUS MSGNO DATE FROMORTO SIZE SUBJECT
which means that the status of the message first, then the number that the
message occupies in the folder, the the date it was sent, then who sent
the message, the size and finally its subject. All of the definitions of these
tokens were explained before in this document, and can be read by following
Each token can be given a width. It makes sense to assign width only
to those fields that have variable width. Those fields that have variable
width have their final width determined last and therefore may not appear
in the screen if this is not wide enough to contain more than the fields
with fixed width.
When a field has variable size, you can specify its size by adding it
to the name of the token, so something like SUBJECT(60%), or SUBJECT(23)
has this effect.
Here are the rules that determine how the specification of sizes
determines the width of the fields, when the width is variable.
- If both the FROMORTO and SUBJECT token appear in the definition of the
index-format variable, and they
are not given a width at all, then it is assumed a 2 to 1 ratio, as explained
- If a token with variable width is given a width as TOKEN(20), then that
will be considered as a fixed width for the token and its width will be assigned
before the rest of the tokens with variable width.
- If a token with variable width is given a width like TOKEN(20%), and only
one token was given a width in this form, then that token will use 20% of the
width of the screen.
- If at least two tokens are given a definition of the form TOKEN(n%), then
their widths will be assigned in proportion to the addition of the percentages and
to the remaining space, so using FROMORTO(3%) SUBJECT(1%) means that the
FROMORTO field will have a width three times bigger than the SUBJECT field.
Now we are finally ready. The default configuration of the
index-format variable for Pine is
Pine includes much more tokens that the ones discussed. Similar tokens
to STATUS are FULLSTATUS and IMAPSTATUS, which contain more information
about the status of a message than what STATUS does. I recommend to change
STATUS by IMAPSTATUS, since it denotes Unread messages with the flag and not with the flag, which
is more proper, I think. It takes some time to get used to it, but it is
worth it. Also, it has the advantage that it uses different columns for
different flags, so you can always tell which flags were set to any
message, by just looking at the index, which is not the case with the
Tokens that are similar to FROMORTO, include FROM, TO, and
FROMORTONOTNEWS. The first two are self explanatory, the latter is the
same as the FROMORTO token, with the difference that in a newsgroup it
behaves like the FROM token.
Tokens that are similar to SIZE, include the SIZECOMMA and KSIZE.
SIZECOMMA is a new token, but it is the old definition of SIZE previous to
Among the tokens that are similar to DATE you can find SMARTTIME,
SMARTDATE, which are tokens that display the date in a different way (like
saying yesterday instead of saying yesterday's date)
The only token that does not enter into any of the categories
discussed above is the SCORE token, which will show you the score of the message in the folder.
Generating the Index
When you open a folder, Pine requests from the server the information
that it needs in order to display the index. What this means is that Pine
requests about 20 envelopes from the server (which is about the number of
messages that fit in a screen of 24 lines). Pine caches this information,
so that whenever needed again, this information is not requested to the
server again, reducing traffic to the server.
Notice that Pine needs to connect to the server to request this
information, since it is not handed to Pine when a folder is opened. Even
if we needed to sort this folder, the sorting process of the folder will
be done by the server, so envelopes will not be sent to Pine by the
One of the reasons why this is done this way, is because otherwise,
Pine would be very slow. Not because the program itself would be slow, but
because transferring the information from the server has a cost, and that
cost is paid in speed, so in a way, one would like that the server did all
the work, and Pine only request information about the work done. That's why
only a limited number of envelopes are requested, and later cached, as opposed
to requesting all the envelopes.
In order to increase speed, Pine usually sends to the screen a line in
the index as soon as the information is available. Sometimes this can be
seen (because of traffic speed) and this causes that empty lines will be
momentarily seen in the screen. This behavior annoys some people, and if this
annoys you, you should manually add them to your .pinerc file. Just
write under feature-list the following: