Subject: MHonArc mail archive line wrapping

From: Stuart Cheshire <[email-masked]>
Date: Tue, 15 Feb 2011 12:46:54 -0800

In the MHonArc mail archive there are often super-long lines, which  
would be wrapped to the window width when viewing in most mail  
clients, but when viewed in a web browser they appear as long single  
lines which take a lot of left-to-right scrolling to read them.

For example: <http://www.ietf.org/mail-archive/web/renum/current/ 
msg00060.html>

This appears to be due to MHonArc's use of the PRE tag, which tells  
the web browser to display the literal text exactly as given, in a  
fixed-width font.

The MHonArc FAQ suggests a couple of solutions to this problem:

> Can long lines be wrapped in converted messages?

<http://www.mhonarc.org/MHonArc/doc/faq/mime.html#lineclip>

> Can the <PRE> tags be removed from converted messages?

<http://www.mhonarc.org/MHonArc/doc/faq/mime.html#removepre>

Can we consider using either of these options?

Using "maxwidth=xxx" would solve this problem, though of course it  
opens the debate about what's the right value for "xxx".

Using "nonfixed" has the nice property of letting the web browser  
wrap the text to the window width, but might break ASCII-art  
diagrams. Perhaps that could be fixed by making the default font a  
fixed-width one (e.g. via style sheet) and using the "keepspace"  
option, which would give us monospaced text while still allowing the  
web browser to wrap the text to the current window width.

Stuart Cheshire <[email-masked]>
* Wizard Without Portfolio, Apple Inc.
* www.stuartcheshire.org

---

From: Lixia Zhang <[email-masked]>
Date: Tue, 15 Feb 2011 12:53:59 -0800

good catch of the problem. 
I suffered when I read IETF email on the web.
Would be great to see this fixed.

Lixia

On Feb 15, 2011, at 12:46 PM, Stuart Cheshire wrote:

> In the MHonArc mail archive there are often super-long lines, which would be wrapped to the window width when viewing in most mail clients, but when viewed in a web browser they appear as long single lines which take a lot of left-to-right scrolling to read them.
> 
> For example: <http://www.ietf.org/mail-archive/web/renum/current/msg00060.html>
> 
> This appears to be due to MHonArc's use of the PRE tag, which tells the web browser to display the literal text exactly as given, in a fixed-width font.
> 
> Using "maxwidth=xxx" would solve this problem, though of course it opens the debate about what's the right value for "xxx".
> 
> Using "nonfixed" has the nice property of letting the web browser wrap the text to the window width, but might break ASCII-art diagrams. Perhaps that could be fixed by making the default font a fixed-width one (e.g. via style sheet) and using the "keepspace" option, which would give us monospaced text while still allowing the web browser to wrap the text to the current window width.
> 
> _______________________________________________
> Ietf mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/ietf

---

From: Bjoern Hoehrmann <[email-masked]>
Date: Tue, 15 Feb 2011 22:32:50 +0100

>lines which take a lot of left-to-right scrolling to read them.

That is the result of some clients and users violating netiquette and
mail standards, for instance, RFC 1855, section 2.1.1:

  - Limit line length to fewer than 65 characters and end a line
    with a carriage return. 

and RFC 2822 (and similarily RFC 5322), section 2.1.1:

  There are two limits that this standard places on the number of
  characters in a line. Each line of characters MUST be no more than
  998 characters, and SHOULD be no more than 78 characters, excluding
  the CRLF. 

And this does not cause problems just with unwrapped lines, it also has
other effects, like people quoting excessively long lines on one line
but then write their own text properly wrapped (that's appropriate be-
havior if long lines are rare and most likely intentional, such as when
including some computer code you don't want wrapped at odd positions.)

I note that one of the main culprits here are Apple Mail users, although
you seem to be using it yet have managed to send properly wrapped lines.
If there is something Apple Mail users can do to stop their netiquette
and standards violations, I would apprciate any pointer you may have.

Obviously the solution is to have those using broken or misconfigured
clients use clients that are not broken or configure them correctly.

As for the list archives, you can make the lines wrap by changing the
style sheet (or use an appropriate user style sheet), for instance,

  pre { white-space: pre-wrap; }

should probably do it in modern clients (for older clients there is
option to use proprietary extensions in some browsers, but that may
not be necessary these days.) This would seem preferable over forcing
line wraps in the archival software as that would break lines that are
meant to be long for very good reasons.
-- 
Björn Höhrmann · mailto:[email-masked] · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/

---

From: Marc Petit-Huguenin <[email-masked]>
Date: Tue, 15 Feb 2011 15:22:32 -0800

> meant to be long for very good reasons.

And for people who do no want to wait for Central Services to fix the problem,
here's a Greasemonkey script:

// ==UserScript==
// @name           Fix wrap
// @namespace      http://shalmaneser.org/fix-wrap
// @include        http://www.ietf.org/mail-archive/*
// ==/UserScript==
var pres = document.getElementsByTagName('pre');
for (var i = pres.length - 1; i >= 0; i--) {
	pres[i].style.whiteSpace = 'pre-wrap';
}

- -- 
Marc Petit-Huguenin
Personal email: [email-masked]
Professional email: [email-masked]
Blog: http://blog.marc.petit-huguenin.org

---

From: "t.petch" <[email-masked]>
Date: Wed, 16 Feb 2011 11:57:06 +0100

---- Original Message -----
From: "Marc Petit-Huguenin" <[email-masked]>
To: "Bjoern Hoehrmann" <[email-masked]>
Cc: "Stuart Cheshire" <[email-masked]>; "IETF-Discussion list"
<[email-masked]>
Sent: Wednesday, February 16, 2011 12:22 AM
> > and standards violations, I would apprciate any pointer you may have.

If only Apple Mail users would stop signing mails it would be a major step
forward.

Depending on the algorithm, I either get a blank pane, and have to
get into properties to see the text, or, with more recent PKIX-based
algorithms, have to wait for a megabyte download of CRL (or, if
I am offline, a two minute lockup of my PC).

Grrr  I don't care what standard signed mails conform to, I just
want them filtered out at source:-)

Tom Petch

<snip>

---

From: Stuart Cheshire <[email-masked]>
Date: Thu, 17 Feb 2011 12:34:37 -0800

On 15 Feb, 2011, at 13:32, Bjoern Hoehrmann wrote:

> As for the list archives, you can make the lines wrap by changing  
> the style sheet (or use an appropriate user style sheet), for  
> instance,
>

Thanks, this worked like a charm.

<sarcasm>
And of course the great advantage of having every user do this  
individually, instead of just changing the web site, is that only the  
inner circle of those "in the know" get the benefit of a readable  
mail archive.
</sarcasm>

> That is the result of some clients and users violating netiquette  
> and mail standards, for instance, RFC 1855, section 2.1.1:
>

I'm sure that was all wonderful back in the century of teletypes and  
(if you were very lucky) a 80-column VT100 terminal, but these days I  
read email on devices ranging from my phone at one end of the  
spectrum to my desktop computer with dual 30-inch displays at the other.

On my 30-inch displays your hard-wrapped text appears as a thin  
narrow ribbon of text no matter how wide the window is, and on my  
phone your hard-wrapped lines are too long to fit so they get re- 
wrapped to that charming long/short/long/short pattern so  
characteristic of hard-wrapped text displayed on any device other  
than the one it was created on.

---

From: Masataka Ohta <[email-masked]>
Date: Fri, 18 Feb 2011 07:14:07 +0900

Stuart Cheshire wrote:

> I'm sure that was all wonderful back in the century of teletypes and (if 
> you were very lucky) a 80-column VT100 terminal, but these days I read 
> email on devices ranging from my phone at one end of the spectrum to my 
> desktop computer with dual 30-inch displays at the other.

The assumption on line length is necessary to have multilevel
quotation ("> ", ">> ", etc., see above) with plain text.

> On my 30-inch displays your hard-wrapped text appears as a thin narrow 
> ribbon of text no matter how wide the window is, and on my phone your 
> hard-wrapped lines are too long to fit so they get re-wrapped to that 
> charming long/short/long/short pattern so characteristic of hard-wrapped 
> text displayed on any device other than the one it was created on.

We know that we can use directives of structured text such as:

	.in +3
	...
	.in -3

when necessary.

But, when plain text is good enough, we use plain text.

Assuming you have ASCII key board, 80-column assumption is
reasonable.

						Masataka Ohta

---

From: "Randy Presuhn" <[email-masked]>
Date: Thu, 17 Feb 2011 15:04:02 -0800

Hi -

> From: "Masataka Ohta" <[email-masked]>
> To: <[email-masked]>
> Sent: Thursday, February 17, 2011 2:14 PM
> Subject: Re: MHonArc mail archive line wrapping
...
> Assuming you have ASCII key board, 80-column assumption is

For reasonable devices, I would agree.  But the use case cited
is for  people are using devices with display capabilities
which are in some respects much more limited than those of
the teletypes and CRTs in common use in the 1970s.  The
question is whether to change email practice in order to better
support these limited devices.  (My answer would be "no".)

Randy

---

From: Cyrus Daboo <[email-masked]>
Date: Thu, 17 Feb 2011 20:05:19 -0500

Hi Randy,

> support these limited devices.  (My answer would be "no".)

All we have to do is make sure the tools we use actually make use of IETF 
standards (that have been around for a while) such as 
<https://datatracker.ietf.org/doc/rfc2646/> which would go a long way to 
solving this particular problem.

-- 
Cyrus Daboo

---

From: Sabahattin Gucukoglu <[email-masked]>
Date: Fri, 18 Feb 2011 05:08:12 +0000

On 17 Feb 2011, at 20:34, Stuart Cheshire wrote:
>> That is the result of some clients and users violating netiquette and mail standards, for instance, RFC 1855, section 2.1.1:
>> 
> I'm sure that was all wonderful back in the century of teletypes and (if you were very lucky) a 80-column VT100 terminal, but these days I read email on devices ranging from my phone at one end of the spectrum to my desktop computer with dual 30-inch displays at the other.
> 
> On my 30-inch displays your hard-wrapped text appears as a thin narrow ribbon of text no matter how wide the window is, and on my phone your hard-wrapped lines are too long to fit so they get re-wrapped to that charming long/short/long/short pattern so characteristic of hard-wrapped text displayed on any device other than the one it was created on.

Yes.  So the people who send you messages without information in their messages for helping you to reflow the lines, in a way that does not interfere with email clients and netnews reading clients which do not support those notions, should be enticed to do so.  And since you're sending such an email message, and using the same platform as I am, and since you are using all the right standards while I regularly get flamed to volcanic ash every time I dare to post to Usenet through a netnews-by-mail gateway, I wonder if perhaps you could help?

Cheers,
Sabahattin

---

From: Bjoern Hoehrmann <[email-masked]>
Date: Fri, 18 Feb 2011 10:48:23 +0100

>than the one it was created on.

The developer of your mail client is welcome to develop an algorithm
that recognizes which wraps are intentional and which can safely be
removed, and which parts are quotations and which parts are not. With
that information mails can easily be reformatted as you'd like them
to be. To a point anyway, and developing the algorithm for it won't
be that easy, much as putting mails into the right context is not all
that simple when clients don't send References or In-Reply-To headers,
or, worse, people decide to reply to dozens of mails in one mail; but
something good enough, compared to weird zig zag, certainly seems
feasible.

The need for this exists no matter what other remedy one might have
in mind, short of having everyone upgrade all their software at once
and living with issues with older mails, if you don't want to see (or
in some cases generate yourself) poorly formatted mails, by someone's
standard. As you've noticed, simply sending out very very long lines
breaks deployed software that expects standards compliant e-mails, for
instance. Such is life when trying to use machines to understand some
format that wasn't exactly designed for machine readability.
-- 
Björn Höhrmann · mailto:[email-masked] · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/

---

From: Phillip Hallam-Baker <[email-masked]>
Date: Fri, 18 Feb 2011 10:06:24 -0800

IETF standards should never attempt to solve a technical issue by changing human behavior.

It is futile. And it suggests that the dvelopers are more important than users.

This is a bug in the technology. Fix it.

Sent from my iPad