On Jul 26, 2011, at 08:38 AM, R. David Murray wrote: >On Tue, 26 Jul 2011 13:03:11 +0900, "Stephen J. Turnbull" <step...@xemacs.org> >wrote: >> R. David Murray writes: >> >> > the end. Basically, BaseHeader gets a 'wrap' method, and there is >> > a new policy control, 'refold_source' (I'll probably rename it to >> > 'rewrap_source', since I expect to apply it also to message >> > bodies). >> >> This bothers me. Folding and wrapping are two different things. >> >> Folding is about invertibly reformatting a single logical line to make >> machines happy during transmission, what wrapping "does" is not 100% >> clear to me but it's about making people happy. (I put "does" in >> quotes because it's not obvious to me that the source of wrapped text >> necessarily is a single anything, nor that wrapping need be >> invertible.) >> >> I grant that people and many MUAs take a different point of view about >> header folding, but clearly the RFCs have moved away from placing any >> importance on presentation aspects toward specifying an invertible >> transformation exactly. On the other hand, I think that wrapping >> should place emphasis on presentation. > >Hmm. Makes sense to me. So you'd rather the method were called "fold" >and that refold_source remains the name of the policy control.
Stephen makes a good one, one I agree with. >What's the word for what is done when a text message is made to have >a line length of less than 78 by using quoted printable (or base64) >encoding? Is that also folding? If there's no existing term in common >use, folding would make sense to me. So I have no objection to using >'fold' consistently in the api and code for these operations. Haven't we used 'splitting' as a term for this, at least internally, in previous versions? That's at least what I think of, and I do think we could have two knows to control the different functionality: - To 'split' a line means to take a line longer than a specified maximum, and make it fit into the maximum line length, splitting at whitespace or other semantic separators. - To 'fill' a header means to take the logical contents of the header and recombine and resplit it so that each line is as close to the maximum line length as possible. My analogy here is Emacs's M-q (fill-paragraph). What then is "folding" or "wrapping"? Maybe no different than the above. >Can anyone see a use case for controlling folding of headers separately >from folding of message bodies? I haven't thought of one, which is why >I'm thinking one policy knob controls both. You might have a message body that contains code, in which case you might want to fill the headers (using the terminology above), but not fill the body. Cheers, -Barry
signature.asc
Description: PGP signature
_______________________________________________ Email-SIG mailing list Email-SIG@python.org Your options: http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com