[Toybox] Fwd: Re: fold implementation

scsijon scsijon at lamiaworks.com.au
Sun Apr 6 15:50:57 PDT 2014


> On 04/03/14 19:29, Samuel Holland wrote:
>> On Apr 3, 2014, at 5:56 PM, Rob Landley <rob at landley.net> wrote:
>>> The -u option to fold isn't currently being used...
>>>
>>> Could you describe a little more how unfold would work?
>>
>> Generally, I write papers and such in a text editor with hard wrapping, like nano, and then transfer them to LibreOffice for formatting. So I go from newline after X columns and a blank line between paragraphs to long lines with a single newline between paragraphs. The simplest algorithm would be to remove all newlines except double newlines (and convert those to single). If -s was specified, we would only remove newlines after spaces and tabs (or unless there was no space in that line). Finally, if -w was specified, we would re-wrap at that width.
>
> *shrug* sounds good to me. I note that when we implement our toybox's
> editor, it'll probably need something like this.
>
> It's sad that with all the ascii characters devoted to this sort of
> thing (10=linefeet, 11=vertical tab, 12 = form feed, 13 = carriage
> return) we never had a darn "end paragraph" character.

  You mean character 182 I take it, it's in the extended ascii set.
May I remind you that ascii was designed for teletypes not video
and they had a very limited and mechanical action set by default,
although some did have the extra "character" punches available as an
optional set when ordering. I know mine did and it cost the earth to
have them as I had to justify the added expense before work allowed it
to be ordered.

> The "textcraft" amiga word processor had a visible end paragraph
> character (backwards P with some lines through it) in 1987. Should not
> be rocket science, and yet...
>
> Rob
>

regards
jon





More information about the Toybox mailing list