Help for Pine - Other Rule Configurations
You are in Home > Other Rules


A new feature added to Pine 4.40 (and later versions) is discussed in this section. Let us introduce its importance by giving a few examples.

If you are subscribed to a mailing list or a newsgroup, you will notice very quickly that messages are not isolated, they tend to be in what is called "threads". Threads appear and die as soon as the subject is concluded. Therefore it is natural to have newsgroups (or mailing lists) sorted by Threads in a natural way.

In contrast, personal e-mail tends to be scattered, a continuous correspondece with a friend may not change the string in the subject, although the content of that message may not have anything to do with the subject it originated the correspondence. In this form, sorting by thread does not seem apropriate for personal e-mail, a sorting by arrival seems more natural in this case.

Of course your situation may be different, but the point I want to illustrate is that there may be reasons why you would like to have folders sorted in different ways. The ideal would be, of course, that Pine realized about this and sorted each folder automatically, upon opening it, in the desired order that best suits your need.

This is one of the reasons for this configuration option. To be able to set configuration options that are folder dependent.

There is an extra degree of configurability that this configuration does not reach, which is configurability by person (e.g. save automatically messages from Madamme X in folder "Secret"). This is the only missing bit of this configuration option.

We will explore what types of configurability this option offers and how to accomplish it.

What Type of Other Rules Can Be Configured?

You can only configure rules that affect a folder, like its sort order, its index format and on which message will the cursor be located when the folder is opened.

How Do Other Rules Work?

When Pine is about to open a folder, it checks the list of Other Rules, which you have configured, and executes the rules that has the first match, so it sets the sort order for that folder to what the rule is set to, and so on.

If no Rule is found to match the folder, then your global configuration options will be used, that means those configurations that would apply if no Rules were defined. For example, you have not set any Rule for INBOX, then the sort-order varible in your configuration file contains the order in which messages in that folder will be sorted when INBOX be opened.

How Do I Configure a Rule?

You must press M S R O. As it is usual, you have two options, if you press ?, you can read help on how to set Other Rules, or if you press A, you will start to add a Rule.

Most of the settings are very easy to figure out how to configure and do not require a big explanation, just try it. Notice that the default to the Index-Format configuration is the same as it is for the global configuration for index-format, and can be manually edited if you press ENTER over that line. This may save you time, so that you don't have to write the definition of the index format again.

Notice also that all configurations have a "Default" setting, which is set to be equal to the value that you have set (for the same option) in your global configuration. This is not the default value that Pine has when you start Pine for the very first time.

What you Can not Do with Other Rules

You can't define which folder should be offered for you to save a message to, when you press S to save a message, in such a way that the folder depends on the message and does not follow any type of rule.

You can not create reply-leadin-strings that depend either on the folder that you are using to read the messages, or the message being replied to. This would allow you to ser reply-indent-string that are mailing list dependent or a reply-leading-string in different languages.

Another wish which has not been implemented yet is the ability to choose a smtp server, which be either folder/role/person dependent, not either being able to specify this when sending the message.

All of the above rules can be defined in an easy way if you apply a patch which you can get from here.

Relevant Global Configurations

There's only one configuration option which is relevant, which is enable-rules-under-take. If you enable the above feature, then every time that you open a folder, and you press T O pine will start a new rule, whose default name is Other Rule, and set the values of the definition of that rule to the "default" values, except for the folder type which is set to the folder that you have opened at the time. The current value of any other configuration option is ignored.
You are in Home > Other Rules