Trailling Spaces - was Re: [Clip] Problem getting Select to select
- Larry Thomas wrote:
> I may have found your problem. It is very hard to see some typing errorsRight on Larry! I spent ages a couple of days ago finding a problem
> when you are writing clips and one of the worst of them is to place a
> trailing space where it must not be. This frequently causes clips to fail.
which turned out to be a trailing space. I get these because I quite
often copy a command from the help information and it likes to pick up a
trailing space with it.
I went straight into View | Options and the Documents tab and put a tick
into "trim white spaces". All my previous reservations about that
option went away with my experience of a dam blank that I couldn't see
causing so much trouble.
- I think we have all been burned once or twice by that one.
I now routinely look for [space]^p in clips or, as was suggested
previously using Modify|Lines|Trim Blanks to get rid of those
insidious trailing blanks.
I remember posting a clip a couple of years ago and having Jody post
that reminder and, sure enough, that was it.
We need a "Top Ten Mistakes" somewhere for easy reference along with
a "Top Ten Tricks." The trailing blank has got to be the #1 !
- Hi All,
I have decided to change my clip due to the problem with the
Modify/Lines/Trim Blanks function. It does not work in too many cases and
I like Alec Burgess solution so the following clip is now what I am using
and I have tested it in both regular documents and in the clip editor.
I do have a serious warning when testing clips on the clip editor. During
this test, I was using the W option in the replace command and the clip
performed the replace on the _entire_contents_ of the current library.
When you are testing such a clip, you may not be so happy to find that your
whole library has been modified instead of just one clip especially if the
modification turns out to be a damaging one. Of coarse, you can just close
and reopen the clip panel without saving but if you should forget and
Here is the clip;
H="Remove Trailing Spaces"
;Larry Thomas <larryt@...>
;06/01/2003, 08:32:15 AM
;With help from "Alec Burgess" <burale@...>
;and "Mark B." <breaumark@...>
^!Replace "\s+\n" >> "\n" TISAR