news-relayFrom: (jlc (Jonathan Cunningham)) 
Author Message
 news-relayFrom: (jlc (Jonathan Cunningham))

Some people send e-mail with very long lines (eg if they are using a
mailtool which word-wraps automatically without inserting line breaks).

Some of us read mail using terminal emulators, and this is inconvenient.
(I have a PC on my desk, and I log into a Sun for reading e-mail.)

It is a bad idea anyway, since there are still mailers and mail
connections which truncate very long lines (eg Internet between
different commercial mail systems this can happen - I found this out
trying to send an rtf file). If this does happen, you can lose the last
few sentences of long paragraphs.

I just had to reformat a long text message I received, in which long
pieces of text were interspersed with bullet points lists etc., so that
I couldn't just <Enter> j the whole file. I wrote the following short
utility to help. It could also be useful for checking outgoing messages,
particularly if you have multiply nested "quoted" inserts with lots of
extra indentation (be nice to your readers!).

Even if it is of no use, you could always send me abusive mail about my
programming style! :-). (Any abuse will be ignored.)


-----------------CUT HERE--------------------------------------------
                                                       ;;; 31st Mar 1994

> File:     ved_width.p
> Purpose:  checking mail messages for overlong lines
> Author:   JLCunningham
> Usage:    In ved, use <Enter> width, or <Enter> width <n>
>           The first form just reports the length of the longest
>           line in the current ved window. The second form will
>           move the cursor to the first line that is as long as
>           the number <n>, or the longest line if <n> is not a
>           number. Example:
>               <Enter> width *
>           will move the cursor to the (first of) the longest line(s)
>           in the file.
> Bugs:     Only calls vedtrimline() on current line, thus assuming that
>           everyone else's code is bug free: always a serious bug :-).
> Features: Doesn't mess with vedpositionstack, so you will be left at
>           the end of the file if you use a parameter greater than the
>           length of the longest line.


define ved_width();
    lvars line;
    lvars len;
    for line in vedbuffer using_subscriptor subscrv do
        max( line.length, len ) -> len;
    vedputmessage( 'Max width is ' >< len );
    returnif (vedargument = nullstring);
    vedargument.strnumber or len -> len;
    vedjumpto( 1, 1 );
    until vedatend() do
        returnif (.vedthisline.length >= len);
    vedputmessage( 'No line so long' );

Mon, 16 Sep 1996 21:49:30 GMT  
 [ 1 post ] 

 Relevant Pages 

1. news-relayFrom: (Chris Dollin)

2. news-relayFrom: (Chris Dollin)

3. forwarded (jlc) Re: worth learning pop11 at university


5. Fw: FWD: from Jonathan Cunningham about Macintosh implementations

6. Forwarding message 22.03.00 from Jonathan Cunningham

7. Followup to message 22.03.00 from Jonathan Cunningham (fwd)

8. forwarding message from Jonathan Cunningham (with comments)

9. news-relayFrom: (Robin Popplestone)

10. news-relayFrom: (Robin Popplestone)

11. news-relayFrom: (Robin Popplestone)

12. news-relayFrom: (Robin Popplestone)


Powered by phpBB® Forum Software