|FAQ about patches|||||More patches|||||Main Page|||||MD5 sum for this patch|
Justify paragraphs that contain more than one level of quoting.
Patch is available for versions: pine 4.33 pine 4.40 pine 4.41 pine 4.42 pine 4.43 pine 4.44 pine 4.50 pine 4.51 pine 4.52 pine 4.53 pine 4.55 pine 4.56 pine 4.58 pine 4.60 pine 4.61 pine 4.62 pine 4.63 pine 4.64
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. Finally, in version 4.60 the patch started to support flowed text, this means that if flowed text contains a non standard quote string it will be wrapped correctly. For example, you can see image which shows flowed text in a terminal 80 columns wide. If you compress this text, you can see that text is wrapped and painted correctly.
Starting in version 4.62, I have added support for removing paragraphs. The command ^W^P can be used to erase the paragraph over which the cursor is. If the cursor is not over a paragraph, Pico will delete the paragraph following to the position of the cursor. Paragraphs that are quoted are also recognized by this patch (and it is the main reason why this functionality was added to this patch). You can recover a paragraph that you just deleted by pressing ^U. If you delete two consecutive paragraphs without pressing any other key in between, then pressing ^U will recover both paragraphs.
Also new in version 4.62, this patch adds support for trimming quote text. Now the variable quote-suppression-threshold also controls the number of quoted consecutive lines that are displayed, not only those quoted using the > character.
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 (this means that, 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 "> " (two spaces at the end), Pine will fail to recognize quoted text, even if it is justified with the ">" or "> " quote strings.
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 11:11:16 PDT Tue Aug 29 2006.