FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » "wordwrap" in messages sent to mailman list
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
"wordwrap" in messages sent to mailman list [message #26548] Tue, 26 July 2005 22:06 Go to next message
tymp is currently offline  tymp   United States
Messages: 13
Registered: July 2005
Karma: 0
Junior Member
Hi,

I had a confusion about the way that 'wordwrap' works in fudforum. I guess i understand now (the feature in admin/global settings is to prevent long 'words' in the forum), but the way i usually think of wordwrap relates to text documents and email (adding a space to break up long character strings does something like what i think of as 'hard wrap', where as the more common 'soft wrap' would limit the length of text lines by 'wrapping' at word boundaries near a line-length-limit).

The problem i had was that messages posted to the forum and sent to mailman had no line-breaks, so the screen side-scrolled for the length of each paragraph. My hack solution was changing the last line in include/mlist_post.php to
send_email($from, $list_email, $subject, wordwrap($final_body), $header);

And this seems to work for me.

This seems like it would a useful configuarable feature. Well, maybe i just missed something, or, do you think of this as the responsibility of the mailing list manager? According to http://mail.python.org/pipermail/mailman-users/2002-September/022335.html it is considered a user-agent issue.

I dunno. Thought i'd ask/share.

cheers. fudforum is pretty freaking amazing.
Re: "wordwrap" in messages sent to mailman list [message #26553 is a reply to message #26548] Tue, 26 July 2005 22:21 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
When posting to the mailing list FUDforum normailized HTML newlines <br> into plain-text ones \n. This hack should not be necessary unless the original input text didn't heave line breaks between paragraphs.

FUDforum Core Developer
Re: "wordwrap" in messages sent to mailman list [message #26555 is a reply to message #26553] Tue, 26 July 2005 22:49 Go to previous messageGo to next message
tymp is currently offline  tymp   United States
Messages: 13
Registered: July 2005
Karma: 0
Junior Member
Between paragraphs is fine. But within paragraphs, there are no line breaks without the hack.

Seems like the mail should appear in the mailman archive as it does in the fudforum input? ...i guess this is really a pipermail (mailman default archiver) issue, not a mailman issue, because it's only in the mailman archive that it scrolls vertically.

(wow, you are quick)
Re: "wordwrap" in messages sent to mailman list [message #26557 is a reply to message #26555] Tue, 26 July 2005 22:53 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Well, here is the thing, when you type a message into the forum the wordwrap functionality (forum's one) is there to prevent someone from making a very long un-interrrupted word that would cause the display page to have a horizontal scroll. It does it by inserting spaces, affectively hard-splitting those words.

When it comes to synching message to ML from FUD, the forum strips all html, converting things like emoticons back into text. In this process any linebreaks <br /> are removed, BUT new lines \n from original input still remain.

So if you enter a[newline]b[newline] the ML message should have:

a
b

in it.


FUDforum Core Developer
Re: "wordwrap" in messages sent to mailman list [message #26560 is a reply to message #26557] Wed, 27 July 2005 03:30 Go to previous messageGo to next message
tymp is currently offline  tymp   United States
Messages: 13
Registered: July 2005
Karma: 0
Junior Member
Yes, breaks between paragraphs are no problem. But without the wordwrap() hack, there are no line breaks within paragraphs, so long paragraphs cause horizontal scroll (in the pipermail archive screen).

Should i post an example? (I'd have to revert my hack, etc..)

Hope this makes sense
Re: "wordwrap" in messages sent to mailman list [message #26562 is a reply to message #26560] Wed, 27 July 2005 05:27 Go to previous messageGo to next message
tymp is currently offline  tymp   United States
Messages: 13
Registered: July 2005
Karma: 0
Junior Member
for example:

http://lists.fgoly.org/pipermail/coretest_lists.fgoly.org/2005-July/000057. html
Re: "wordwrap" in messages sent to mailman list [message #26566 is a reply to message #26562] Wed, 27 July 2005 13:12 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The forum tries to keep the body of the message as close to the original as possible, that means not wrapping it unless absolutely necessary.
If a mail client is too dump to wrap very long lines on spaces, then I'd say it is a mail client issue.


FUDforum Core Developer
Re: "wordwrap" in messages sent to mailman list [message #26586 is a reply to message #26566] Thu, 28 July 2005 05:42 Go to previous messageGo to next message
tymp is currently offline  tymp   United States
Messages: 13
Registered: July 2005
Karma: 0
Junior Member
Ilia wrote on Wed, 27 July 2005 09:12

The forum tries to keep the body of the message as close to the original as possible, that means not wrapping it unless absolutely necessary.
If a mail client is too dump to wrap very long lines on spaces, then I'd say it is a mail client issue.


Well, i think it is really a web issue with pipermail. It should not allow long lines to cause vertical scroll in the html interface.

However, most messages that end up there get 'wrapped', by mail clients such as outlook, thunderbird, gmail, or whatever is doing it. I don't really know where this wrapping usually happens, just that all the messages with long lines that went from fudforum to the mailman lists were causing vertical scroll. (There is one person on our mailman lists whose messages are doing this too.. i need to ask her what mail interface she's using...)

Wordwrap()-ing the message body resolves this problem; it seems to duplicate a common feature in 'mail clients'. ... isn't fudforum the mail client in this situation?

At least, maybe this is an issue for future consideration... Seems like this ml<->forum integration is a relatively new science, so who knows...

Anyhow, I'm happy with the hack solution. Thanks for making this FUDforum thing so that i have something to complain about!!

(btw, what is the FUD short for? 'fear uncertainty and doubt'? i think not!)

Smile
Re: "wordwrap" in messages sent to mailman list [message #26591 is a reply to message #26586] Thu, 28 July 2005 13:06 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
While FUDforum is a mail client of sorts in this situation, I'd still say that failure to wrap on long lines with valid spaces is a mail client deficiency. Forcing wordwrap() on mail body could create all sort of problems especially when working with full-body notification.

As far as FUDforum, the name, it stands for Fast Uncompromising Discussion Forum.


FUDforum Core Developer
Re: "wordwrap" in messages sent to mailman list [message #26617 is a reply to message #26591] Fri, 29 July 2005 10:19 Go to previous messageGo to next message
ligesh is currently offline  ligesh   India
Messages: 63
Registered: July 2005
Karma: 0
Member

Adding unnecessary newlines into a message is absurd. Actually one paragraph should be a single uninterruped line. Some idiot old emacs hackers will argue otherwise, (This is because the stupid emacs still doesn't have virtual word wraps) but that behaviour is not very editor friendly.

In vim, u can set the linebreak, so vim will automatically wrap long lines around the edge, and also recognize virtual lines, so u can trivially treat paragraph as a single line. Wrapping text around the edge is the job of the display system that is doing the final job, and not the work of the MUA.
Re: "wordwrap" in messages sent to mailman list [message #26618 is a reply to message #26548] Fri, 29 July 2005 10:29 Go to previous messageGo to next message
ligesh is currently offline  ligesh   India
Messages: 63
Registered: July 2005
Karma: 0
Member

How dare these fucking morons arbitrarily break the line at 80chars (Which is that they expect people to do.). What is the fucking logic behind the 80chars? Just because in the old time PC's had only 80characters.

The irritating thing is these buggers all have a holier than thou attitude and say that anybody who refuses to follow their stupid conventions r somehow breaking some holy laws of their religion.

The wrapping is the job of the final display software. It can wrap it according to how long is the display system at its end. The sender cannot know, and should not make any assumptions regarding that. What if i am using a terminal which has less than 80columns? The message will be comepletely unreadable, with lines getting broken arbitrarily. If you send a paragraph as a single line, it will work in any display system.
Re: "wordwrap" in messages sent to mailman list [message #26641 is a reply to message #26591] Fri, 29 July 2005 17:52 Go to previous messageGo to next message
tymp is currently offline  tymp   United States
Messages: 13
Registered: July 2005
Karma: 0
Junior Member
Ilia wrote on Thu, 28 July 2005 09:06

While FUDforum is a mail client of sorts in this situation, I'd still say that failure to wrap on long lines with valid spaces is a mail client deficiency.

Well, in this case, this is pipermail (mailman archiver) problem.. The mail looks fine, but in the archive, it scrolls all the way out. ..I thought it might be worth noting since mailman is so common..

Quote:

Forcing wordwrap() on mail body could create all sort of problems especially when working with full-body notification.


Yeah, because i think notification doesn't make sense when there is a synced mailing list, i have it turned off anyhow. Well, that is not true, i changed the user_opt(?) to have it default off during registration. Don't you think having email notification with a linked mailing list is redundant and confusing?

Hmm, in general, do you think that the mailing-list integration works as well as the rest of the forum? I think the forum is amazing, and i didn't find any other forum that synchronizes with a mailing list as easily (only phpbb, and that needs a mod). But the mailing list integration part seems like it is less well-developed (which is not a fudforum problem necessarily - it's just that mailing lists are old-fashioned, i think, and there are so many mail protocols and mail clients). Maybe i'm missing something though.

Thanks for your thoughts and time.
Re: "wordwrap" in messages sent to mailman list [message #26643 is a reply to message #26641] Fri, 29 July 2005 18:03 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I am very much against adding hacks for bugs in other applications, that is a bad practice. If mailing list archival tool cannot realize that a message needs to be wrapped on spaces on very long lines that is the problem for the developers of that software to solve.

I think mailing list integration works quite well, I know many forum installs that mirror mailing lists with over 100k messages being shared through the process and doing so without any problems.


FUDforum Core Developer
Re: "wordwrap" in messages sent to mailman list [message #26644 is a reply to message #26641] Fri, 29 July 2005 18:18 Go to previous messageGo to next message
ligesh is currently offline  ligesh   India
Messages: 63
Registered: July 2005
Karma: 0
Member
Quote:


Well, in this case, this is pipermail (mailman archiver) problem.. The mail looks fine, but in the archive, it scrolls all the way out. ..I thought it might be worth noting since mailman is so common..


Wrapping a paragraph at some arbitrary length (80 is a actually arbitrary in these days when terminals range from pda's to very large screen terminals) is wrong, and a fucking bad programming. Why not follow the standards of the punch card days then? It is the job of the final display software to wrap the sentence as it sees fit. A paragraph is always a single line, and this is the easiest way to manage it at the sending end.

You can in fact, fix the piper mail code to simply add a 'wrap' inside the td when u are printing it. i am actually confused here, since 'wrap' is the default behaviour, pipermail must be forcibly setting the td to 'nowrap'. So search for 'nowrap' in the pipermail code and remove it, and i am sure a mail archiver if it is written in python would be very simple.

Quote:


Hmm, in general, do you think that the mailing-list integration works as well as the rest of the forum? I think the forum is amazing, and i didn't find any other forum that synchronizes with a mailing list as easily (only phpbb, and that needs a mod). But the mailing list integration part seems like it is less well-developed (which is not a fudforum problem necessarily - it's just that mailing lists are old-fashioned, i think, and there are so many mail protocols and mail clients). Maybe i'm missing something though.

Thanks for your thoughts and time.



Mailing lists have a niche. I mean, as long as there are mails, there will be mailing lists. But forums are more convenient. the problem with mailing lists is that u have to subscribe if u want to get an answer to a simple question, and then it will start flooding ur mailbox with a lot of junk. Forums on the other hand are less intrusive.

Fudforum has a very tight mailing list integration, which is what made it my choice.
Re: "wordwrap" in messages sent to mailman list [message #26645 is a reply to message #26548] Fri, 29 July 2005 18:21 Go to previous messageGo to next message
ligesh is currently offline  ligesh   India
Messages: 63
Registered: July 2005
Karma: 0
Member


As a matter of fact, i have integrated mailman with fudforum, though i don't understand why u need pipermail when the messages are displayed in fudforum.

Isn't the job done by pipermail redundant? Why do u need to display the messages in two places in two formats?
Re: "wordwrap" in messages sent to mailman list [message #26647 is a reply to message #26645] Fri, 29 July 2005 21:30 Go to previous messageGo to next message
tymp is currently offline  tymp   United States
Messages: 13
Registered: July 2005
Karma: 0
Junior Member
It's a shared server and i don't have access to the pipermail or mailman installation. (Even if i can make changes per-list, they are likely to be overwritten by the cpanel app). It would be better to scrap pipermail, but mailman has builtin links, so there it is. Anyhow, the little wordwrap hack (it is a hack, and unsightly) works for me, for now, and i can see Ilia's reasoning about not compensating for other programs bugs, so all is well.

As to 80 char wrapping: sure, we're enslaved to history, but... the design freaks have a point about line-length affecting readability. Your eye just gets lost past a certain line-length. And, the printed page gives you about 80 chars across in a readable font-size.

cheers.
Re: "wordwrap" in messages sent to mailman list [message #26648 is a reply to message #26647] Fri, 29 July 2005 21:38 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
As long as the hack works for you that's great... But, I hope you understand my reason for refusing to include in the core install.

FUDforum Core Developer
Re: "wordwrap" in messages sent to mailman list [message #26656 is a reply to message #26647] Sat, 30 July 2005 18:53 Go to previous messageGo to next message
ligesh is currently offline  ligesh   India
Messages: 63
Registered: July 2005
Karma: 0
Member
tymp wrote on Fri, 29 July 2005 17:30



As to 80 char wrapping: sure, we're enslaved to history, but... the design freaks have a point about line-length affecting readability. Your eye just gets lost past a certain line-length. And, the printed page gives you about 80 chars across in a readable font-size.

cheers.


That "comfortable to the eye limit" is actually 65 chars. And anyway, how the wrapping should be done is the perogative of the final display software. For instance, what will happen in a PDA which has only 40chars? Or even in a normal terminal itself, there are situatins where the display screen is less than 80char - sometime i split the screen midway into two; the single line paragraph will work in all situations.

I am not arguing for sentences spannign long distances horizontally, but just that paragraphs should be single line. And it is the duty of the final display software to wrap it around.

The 80 char instanity is basically owing to emacs still lacking a soft word wrap. And like all gnu enthuisiasts, now they want to turn this bug into a feature. You know like making the darkness as the standard. i have seen this in the open source world quite a lot of times.

Problem: linux is not very userfriendly:

Answer: That is actually Good as it will force people into learning computers in detail.

Problem: Both Kde and Gnome Suck (I use fvwm btw).

Answer: Yeah so what, u got choice, which is more important. (they don't understand the age old maxim that there is no choice among rotten apples.)

I guess it is a human nature after all, to claim that the drawbacks are all actually blessings in disguise. And this 80 char madness is just another one of the insanities. It is sort of like the Big Brother's propaganda in 1984.
Re: "wordwrap" in messages sent to mailman list [message #26657 is a reply to message #26548] Sat, 30 July 2005 18:56 Go to previous message
ligesh is currently offline  ligesh   India
Messages: 63
Registered: July 2005
Karma: 0
Member

That open source people r behaving like the big brother in 1984 is not coincidence. After all they are all Commie bastards. Smile
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Who adds the In-Reply To
Next Topic: Smileys wrapping in msg-posting window
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 09 17:38:47 GMT 2024

Total time taken to generate the page: 0.04051 seconds