Subject: Pico limitations

From: [email-masked] (Matt Messina)
Date: 23 Apr 1995 21:46:42 GMT

I realize that Pico is not the most robust editor ever written, nor is it 
intended to be.  But I like it anyway.  It's almost as fast as vi and 
much easier to use.

Inability to search for regexps is not a problem; it's just a missing
feature.  But there are two problems with the editor that might screw up
people's files. 

1) The "long lines wrapped" problem.  When Pico reads in a file, if there 
   are lines longer than X, then the lines are split.

2) Out of memory.  If there is not enough memory, Pico will load the file
   as much as it can, but will leave off the lines at the end that it
   doesn't have room for.  (I have only observed this once, on a very 
   heavily loaded machine with a 200K file.)

Are there any plans to fix these?  A command line option that would
sacrifice speed for arbitrary line length might be a good idea.  And the 
truncating of a file is unacceptable.  If there isn't enough room, it 
should just say, "Sorry, I can't load the whole file."

This is on Pico 2.5
-- 
Matt Messina
[email-masked]

---

From: [email-masked] (R. Stewart Ellis)
Date: 25 Apr 95 00:22:18 GMT

>should just say, "Sorry, I can't load the whole file."

Since pico is basically a minimal uEMACS, why not just
"enable-alternate-editor-explicitly" and use GNU emacs or one of the emacs
subsets or clones such as jed or jove?  I use jove.

-- 
  R.Stewart(Stew) Ellis, Assoc.Prof., (Off)810-762-9765   ___________________
  Humanities & Social Science,  GMI Eng.& Mgmt. Inst.    /   _____  ______ 
  Flint, MI 48504      [email-masked]               /        / /  /  / /
  Gopher,chimera,nn,tin,jove,modems, free code is best!/________/ /  /  / /

---

From: [email-masked] (Bob Brody)
Date: 26 Apr 1995 09:22:36 GMT

>   are lines longer than X, then the lines are split.

Start PICO with the -w switch and it will turn off word wrap.  E.g.,

    pico -w index.html

>   heavily loaded machine with a 200K file.)

I haven't encountered this (yet?) so can't speak to it.  I agree,
however, about this business of truncating.  Similarly with line
length.  If the line, or file, is too long, the program truncates.
Excuse me but the info is there for a reason, either don't load or
leave it alone.

 bob
 [email-masked]

---

From: [email-masked] (Jonathan and DearOldDad)
Date: 24 Apr 1995 02:34:29 GMT

Matt Messina ([email-masked]) wrote:
: I realize that Pico is not the most robust editor ever written, nor is it 
: intended to be.  But I like it anyway.  It's almost as fast as vi and 
: much easier to use.
       AGREED 1000%
: Inability to search for regexps is not a problem; it's just a missing
: feature.  But there are two problems with the editor that might screw up
: people's files. 
: 1) The "long lines wrapped" problem.  When Pico reads in a file, if there 
:    are lines longer than X, then the lines are split.
       Well now, what other choices are there??  It could run them off the 
page or truncate them.  The solution is simple ... set your terminal to 
word wrap OUTGOING text at about 70 columns (72 max), so that when 
someone includes all or part of your message in the reply, and adds the : 
or the > or the # in front, it's still less than 80 columns.
       Same thing occurs when you ^R read in files.  If the file you're 
reading in is more than 80 columns, don't blame pico, reformat it first, 
then read it in.
       Now I suspect that when I try to post this, I'm gonna get a 
message that the posting exceeds 80 columns, 'cause your posting appears 
to be quite wide, but we'll see.    BYE.

DearOldDad                             /~~~/~~~/~~~/\    /\/\    /\
                                      /   /   /   /  \/\/ POCONO MTNS PA
DearOldDad:The older I get, the smarter I used to be./  \/\[email-masked]
  Jonathan:Kids are people too; Have guitar, will travel.\ \/\ \  /\ \
Thought for the day:               /   /   /   /   /   /  \/  \ \/  \/\
None:My mind is temporarily out of order. /___/___/___/___/____\/____\_\

---

From: [email-masked] (Jonathan and DearOldDad)
Date: 24 Apr 1995 02:45:13 GMT

Jonathan and DearOldDad ([email-masked]) wrote:
       in part ...
:        Now I suspect that when I try to post this, I'm gonna get a 
: message that the posting exceeds 80 columns, 'cause your posting appears 
: to be quite wide, but we'll see.    BYE.

Nope, it didn't ... so Matt apparently has his act together, now if 
everyone else would set the linewidth to a lower number, we could all 
live in peace and harmony and reply to one another, forever and ever, 
Amen.   BYE again.

---

From: [email-masked] (Matt Messina)
Date: 26 Apr 1995 17:10:02 GMT

>Start PICO with the -w switch and it will turn off word wrap.  E.g.,

WRONG.  WRONG.  WRONG.  How many times must we rehash this?  The -w option
turns off "word wrap," which automatically moves words to the next line
when you reach the end of a line.  That has nothing to do with "long lines
wrapped," which occurs only when reading in a file.  Read in a file with
lines longer than 255 characters (e.g. .newsrc) and you'll see the
problem. 
-- 
Matt Messina
[email-masked]

---

From: [email-masked] (Joseph Brennan)
Date: 27 Apr 1995 14:25:55 GMT

Jonathan and DearOldDad <[email-masked]> wrote:
>page or truncate them.

How about leaving the file the way it is?  I guess you've never seen
program source code or dot files where the location of line breaks is
significant.  You can't just insert newlines willynilly.  Pico's flaw,
to put a fine point on it, is breaking long lines without any warning
to the user.

Take a look at a .newsrc file that has been maintained by trn for a
while.  Each newsgroup gets one line with a list of article numbers
that have been marked read (or "deleted" in pine's language).  Some
such lines are long strings of numbers, because the user has skipped
around and read articles here and there.  Lines longer than some
limit-- is it 256 characters perhaps?-- will be split by pico as it
reads in the file, with no comment on screen.  This makes the file
unusable by trn, since it is supposed to have one line per newsgroup.
Strangely, if you happen to notice what happened, and delete the
unwanted newlines, pico can do it, and when you write the file back to
disk, pico can do it.  It just can't read such long lines from disk.
That's a bug.

Joseph Brennan     Academic Information Systems
                   Columbia University in the City of New York
                   [email-masked]

---

From: [email-masked] (David Edwards)
Date: Thu, 27 Apr 95 20:58:26 BST

> or the > or the # in front, it's still less than 80 columns.

This is not the problem. Whether you have word wrap turned on or off, 
Pico still splits lines longer than about 250 characters when it reads in 
a file. Note that you can still enter a 250+ character line while 
editing, just that it can't load them in.

Why does thsi matter? Well, appart from being rather a strange 
limitation, the main problem comes from the "References:" header which 
can get to quite a size when following up to articles in a long thread. 
If it gets split, then newsreaders get all confused and half your header 
ends up in your article. Not very desirable.

--
              _ _                                
   ==========////====================================================
  /         ////   David Edwards:  What's that on your head?         \
 ||  _ _   ////     http://sable.ox.ac.uk/~worc0058/                 ||
 ||  \\\\ ////       [email-masked]           ||
  \   \\\X///         [email-masked]                        /
   ====\XXX/=========================================================