[Python-Dev] Mail archive line wrapping (Was: Import and unicode: part two)

James Y Knight foom at fuhm.net
Fri Jan 21 14:23:31 CET 2011


On Jan 21, 2011, at 6:31 AM, Antoine Pitrou wrote:

> On Thu, 20 Jan 2011 22:25:17 -0500
> James Y Knight <foom at fuhm.net> wrote:
>> 
>> On Jan 20, 2011, at 3:55 PM, Antoine Pitrou wrote:
>>> (by the way, it would be nice if your text/mail editor wrapped lines at
>>> 80 characters or something)
>> 
>> You could complain to Apple, but it seems unlikely that they'd change it. They broke it intentionally in OSX 10.6.2 for better compatibility with MS Outlook.
>> 
>> (for the technically inclined: It still wraps lines at 80 characters in the raw message, but it uses quoted-printable encoding to escape the line-breaks, so mail readers which decode quoted-printable but can't flow text are now S.O.L. Apple used to use the nice format=flowed standard instead.)
> 
> I think most mail readers are able to word-wrap raw text correctly
> (even though it still makes your messages look bad amongst a thread of
> nicely-formatted 80-column messages).
> The real annoyance is when reading Web archives of mailing-lists, e.g.
> http://twistedmatrix.com/pipermail/twisted-python/2011-January/023346.html

Well, yes, that's a pretty annoying bug in mailman, isn't it? If only anyone around here was involved in mailman and could fix it! :) [I've attempted to cc this to mailman-users with this message, but since I'm not subscribed I dunno if it'll make it or not.]

I have this in my user CSS override file to fix the issue for myself globally on all such archives out in the world:
/* Mailing list archives */
html>body>pre { white-space: pre-wrap !important; }

But really, pipermail should just output a suitable style itself, e.g.: <pre style="white-space: pre-wrap"> or a <style>pre { white-space: pre-wrap; }</style> in the header.

That's supported on all browsers since FF3.0, IE8, Safari 3, Opera 8. There are various nonstandard CSS selectors for reaching older browsers (IE5.5+, Firefox pre-1.0+, Opera 4+)...But by the time this change gets made in mailman, and released, and gets into the distros that the various list hosts around the web use, and those hosts get upgraded, I doubt anyone will actually even be able to run those old browsers anymore.

James


More information about the Python-Dev mailing list