Stuart Longland posted on Sun, 06 Apr 2014 20:28:29 +1000 as excerpted: > Hi all, > > I'm guessing this is a known issue as I see reference to it in the > archives.
Yeah, known issue, but there's a couple possible ways of dealing with it. > Basically I have 'wrap text' on out of habit, since it will ensure I > don't post long rambling lines of text that scroll horizontally off the > edge of the screen. > > Unfortunately, this has resulted in me posting a number of broken URLs, > much to my annoyance. The sore spot seems to be mis-detecting > punctuation as a spot for breaking lines, notably the query string > separator (?). Yes it is punctuation (actually, I'd guess it's pretty much anything but a-zA-z0-9 in ASCII, tho of course what's allowed in a URL is limited, and I'm decidedly not a charset expert so I don't have much of a guess on that at all). But it's not just the query separator. In particular, the directory separator (/) is a breaker as well, and in addition to URLs, one place I frequently find it doing the wrong thing is when /italicizing/ something -- If the /italicized/ word comes at the end of a line, instead of breaking at the space immediately before the word, pan will *INSIST* on breaking after the initializing /. The only (easy) way around that is to manually insert a carriage return before the initializing /, which does work. > Pan in general is working much nicer as a news reader, but I'm missing > some of Thunderbird's features, and its handling of flowed text/word > wrapping is one of them. This has long been a sore spot, but apparently not /enough/ of one for anyone with appropriate coding skills to design a patch to fix the problem. > Is there a way to tell pan what characters to break the line on? Or > what characters constitute a single word (or don't) so "words" (URLs in > this case) don't get broken in the middle? Unfortunately no. Not without doing your own patch and rebuild from sources, at least. Meanwhile, the two ways I've found to deal with URL wrapping follow: 1) If I'm lazy, I simply punt, warning about the spit URL and letting people patch it back together themselves if they want (the example link is to a particular btrfs FAQ): [Watch the wrap: long link] https://btrfs.wiki.kernel.org/index.php/ FAQ#What.27s_the_difference_between_btrfsck_and_fsck.btrfs 2) If I think it's worth the hassle, there's a technique I've discovered that fixes the problem, but it *IS* a bit of a hassle: 2a) Write the post in wrapped mode. When you come to the long link, just let it wrap, but put a note to yourself at the bottom to unwrap it later, then continue adding text ABOVE your note to yourself. This way if there's more than one such link... but (hopefully) you don't forget, since there's that note to remind you. =:^) 2b) When you're done composing the message, before send, hit save draft. Just use the autosave if you like; that bit doesn't matter. The reason this technique works is that the process of saving the draft converts all the previously soft line wraps into hard-coded carriage return and line feed chars (RFC-standard line terminations for internet messages). That way, they don't unwrap in the steps below. 2c) Use open draft to restore the draft you just saved. 2d) Hit unwrap text. Because all the previously soft wraps were converted to hard-coded CRLFs in 2b, this will NOT change the previous formatting of the post. 2e) Find and manually remove the hard-coded line endings from your URLs and any place else you don't want them, inserting manual line ends as necessary. Since you're in unwrapped mode now, this will work, without changing the wrapping of anything else, due to 2b converting all the normal soft-wraps to hard-wraps. 2f) Don't forget to remove your reminder note. =:^) 2g) Send as normal. =:^) Of course you'll likely get the long-line warning, but it'll only be for the lines you deliberately made long, so send anyway. 2h) When you next reply to a post, it'll still be in unwrapped mode since that's the way it was when you sent the post and thus closed the window. (You can't set it back to wrapped before sending without undoing all the work you just did!) So you'll have to set it to wrapped once again. Sample result (same URL as above): https://btrfs.wiki.kernel.org/index.php/FAQ#What.27s_the_difference_between_btrfsck_and_fsck.btrfs 3) Use one of the many available URL-shortener services on the net. Tho since those end up being essentially blind links, I like to post both the long link (which I don't bother unwrapping in that case) and the short-form link (which doesn't need wrapping), so people can see where they'll be going. Google on URL shortener : https://www.google.com/search?q=url+shortener 4) Posting that google reminded me of another technique that may or may not work, depending on the link. Often, links include extra information that isn't necessary to actually retrieve the page. Here, it was charset information (&ie=UTF-8). Since I do a lot of feed reading, I often see links with &from=rss or something similar, too. These sorts of extra information can often be stripped, creating a more generic URL as well as shortening it, without killing it. With a bit of luck, stripping this information just happens to shorten the link enough to post as-is, without wrapping. =:^) -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman _______________________________________________ Pan-users mailing list Pan-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/pan-users