FAQ about patches | More patches in the web | Main Page


 
When you reply to a message, which has been quoted by several people and you justify a paragraph, Pine may not notice any other quote strings and justify the paragraph as if there was no other quote strings in it. This patch will help Pine recognize extra levels of quoting, so that justifying will still make the text readable. This is important because the purpose of justification is to make the text more readable, and an incorrect justification may make the text impossible to read.
 
Here's a real example:
 
The following text is not justified:
:) > this is a
:) > test
:) >
:) >
If we justified this text in Pine we'd get
:) > this is a > test > >
:) 
:) 
If you apply the patch and justify the above text, you'd get
:) > this is a test
:) >
:) >
Note how quote levels were preserved.
 
It's very difficult, although not impossible, to fool the algorithm. I still have to find a real life example where I can fool the algorithm, if you find one please let me know. As usual, the Ctrl-U command can undo justification, so keep it in mind if you find that the patch does not do its work correctly.
 
Here there are more interesting examples.
 
New: Additionally, if you use pine with colors, now this patch was added some code that will allow you to read different quoting levels in different colors. Here you can see an image that shows 3 different labels painted correctly.
 
Note that starting in Pine4.41 there is basic support for justification of more than one quoting level, but only when the quote string in every level of quoting is the same (that is to say, other quote strings are not recognized). That implementation of justification has some bugs which do not allow it to recognize certain combinations of the same quote string (in raw form). For example, if a text is quoted with the quote string "> " (one space at the end), and you reply using the quote ">" (no space at the end), pine will justify as if every line in the paragraph that you are justifying was a paragraph itself.
 
Also note that this patch was adapted to be included in the WebMail program IMP. Take a look here.
 
The editor nano (version 1.2.0) also has support for multiple levels of quoting, but it does not support all quotes that this algorithm supports out of the box. For example, nano supports several levels of arbitrary quote strings starting the editor with the command "nano". If you do so, the above test text will be justified as:
:) > this is a ) > test ) > ) >
You can always justify correctly if you tell nano what the quote string is, and that's a big difference with this algorithm, in which you don't have to tell the algorithm what is the quote string, but it will guess it pretty well. It is my understanding that other editors (e.g. vim) behave in a similar way to nano.

Last Updated 17:17:57 PDT Thu May 29 2003.