quoting in reply adds unnecessary word wrap (line break) in quote
Using Evolution version 3.30.5-1.1.
Problem description
Composing replies in plain text and quoting the original message usually introduces additional line breaks. This is because the lines of the original message are each indented and prefixed with a >
. At some point the length of the line reaches the limit for the number of characters per line.
As the original line breaks are retained, it looks like line breaks are added where the original author did not intend one to have. When a line is quoted several times, the remainder may be wrapped again. This leads to original long lines to be shortened and followed by several lines containing one word each.
The problem is that the legibility of the quoted messages suffer. This is part of the "Embarrassing Line Wrap" problem.
Examples
Example 1
Here is the original plain text message:
This is a test of a very long line with many words which have nothing
to say as they are only there to fill the void without any meaning just
in order to produce a very long sentence which will be wrappe with line
breaks at some point.
This is how it is quoted in a plain text reply:
> This is a test of a very long line with many words which have nothing
> to say as they are only there to fill the void without any meaning
> just
> in order to produce a very long sentence which will be wrappe with
> line
> breaks at some point.
As the original line breaks, which were automatically inserted while typing, are retained, the reading flow is disrupted.
Example 2
Here is the original plain text message:
ponelone ponelone ponelone ponelone ponelone ponelone ponelone ponelone
poneltwo poneltwo poneltwo poneltwo poneltwo poneltwo poneltwo poneltwo
ptwolone ptwolone ptwolone ptwolone ptwolone ptwolone ptwolone ptwolone
ptwoltwo ptwoltwo ptwoltwo ptwoltwo ptwoltwo ptwoltwo ptwoltwo ptwoltwo
In the 5th reply the message is quoted as:
> > > > > ponelone ponelone ponelone ponelone ponelone ponelone
> > > > > ponelone
> > > > > ponelone
> > > > > poneltwo poneltwo poneltwo poneltwo poneltwo poneltwo
> > > > > poneltwo
> > > > > poneltwo
> > > > >
> > > > > ptwolone ptwolone ptwolone ptwolone ptwolone ptwolone
> > > > > ptwolone
> > > > > ptwolone
> > > > > ptwoltwo ptwoltwo ptwoltwo ptwoltwo ptwoltwo ptwoltwo
> > > > > ptwoltwo
> > > > > ptwoltwo
Expected behaviour
When a message is quoted in a plain text reply, no line breaks should be (seemingly) added within paragraphs. The quoted message of example 1 would then read as:
> This is a test of a very long line with many words which have nothing
> to say as they are only there to fill the void without any meaning
> just in order to produce a very long sentence which will be wrappe
> with line breaks at some point.
Challenges
As far as I know, simple newlines (↵) and paragraph separators (¶) are not differentiated. Thus it can not safely be said if a line break was intentional (the separated lines should not be merged) or just a result of the hard coded word wrap. Maybe some heuristics can be applied as:
- If the first word of the next line would have fitted within that line, the line break was intentional. In order to check, if the word would have fitted, the maximum number of characters per line of the original composer must be guessed. Maybe by counting the number of characters of the longest line of the original message containing more than one word.
- The specification of paragraphs and hard line breaks of the current CommonMark Specification should be applied.