Loading ...
Sorry, an error occurred while loading the content.

[Clip] Trailing Spacs learnings...

Expand Messages
  • Bob Gorman
    ... ... I like this approach to reducing the snakes venom.... ... I have installed this version, slightly modified (I removed the ^!Select All & ^!Jump
    Message 1 of 6 , Jun 1, 2003
    • 0 Attachment
      At 10:31 AM 6/1/2003, Larry wrote:
      >Hi All,
      >
      >I have found that the ^!Replace command should really be treated like a
      >poisonous cobra in the clip editor,
      <snip>
      >A possible solution to this is to select the entire contents of the clip
      >editor and use the H option to limit the search and replace to the
      >selected/highlighted text.

      I like this approach to reducing the snakes venom....

      >Here is the changed clip:
      >
      >H="Remove Trailing Spaces"
      >;Larry Thomas <larryt@...>
      >;06/01/2003, 09:24:11 AM
      >;With help from "Alec Burgess" <burale@...>
      >;and "Mark B." <breaumark@...>
      >^!Select All
      >^!Replace "\s+\n" >> "\n" HISAR
      >^!Jump 1

      I have installed this version, slightly modified
      (I removed the ^!Select All & ^!Jump 1)
      in my clip library and clipbar.

      >I hope that this solves all of the problems with this business. It sure
      >turned out to be a lot more complicated than I anticipated.

      Yes, but it also provided many incremental learnings both:
      specific to finding & replacing
      use of regedit functions
      and generic such as :
      Use of Info boxes during the debug stage
      Recovery techniques like (just close and reopen the clip panel without saving)

      It has been most helpful for me in learning to cleanup MIME formatted forum
      libraries.

      > ê¿ê
      Even fancy character graphics.

      Bob

      "To create New Answers; you must ask New Questions."
      - Bob Gorman
      http://www.kncell.org

      [Non-text portions of this message have been removed]
    • Larry Thomas
      Hi Bob, ... Welll, ok but you have removed the safety feature. If nothing is selected, the clip will still replace everthing in the library starting from the
      Message 2 of 6 , Jun 1, 2003
      • 0 Attachment
        Hi Bob,

        At 11:25 AM 6/1/03 -0400, you wrote:
        >At 10:31 AM 6/1/2003, Larry wrote:
        >>H="Remove Trailing Spaces"
        >>;Larry Thomas <larryt@...>
        >>;06/01/2003, 09:24:11 AM
        >>;With help from "Alec Burgess" <burale@...>
        >>;and "Mark B." <breaumark@...>
        >>^!Select All
        >>^!Replace "\s+\n" >> "\n" HISAR
        >>^!Jump 1
        >
        >I have installed this version, slightly modified
        >(I removed the ^!Select All & ^!Jump 1)
        >in my clip library and clipbar.

        Welll, ok but you have removed the safety feature. If nothing is selected,
        the clip will still replace everthing in the library starting from the clip
        to the end of the library. The only other way you can avoid this is to
        copy the clip and paste new to a new document and run the clip on it there.
        It actually does not need the ^!Jump 1 line. I just put that there out of
        personal preference to clear the selection and restore the cursor to the
        beginning of the clip. But ^!Select All is necessary if you want to
        restrict your replace to the current clip because select all will not
        select the whole library but only the clip in the clip editor window. And
        as I said before, if you have nothing selected, then the H option has no
        effect at all. It is just ignored.

        Regards,

        Larry
        larryt@...
      • hsavage
        ... Trailing blanks; If you check View/Options/Documents/Trim White Spaces, then, if/when using the clip editor Trailing Blanks are automatically deleted when
        Message 3 of 6 , Jun 1, 2003
        • 0 Attachment
          Bob Gorman wrote:

          >At 10:31 AM 6/1/2003, Larry wrote:
          >
          > > Hi All,
          > >
          > > I have found that the ^!Replace command should really
          > > be treated like a poisonous cobra in the clip editor,
          >
          ><snip>
          >
          > > A possible solution to this is to select the entire
          > > contents of the clip editor and use the H option
          > > to limit the search and replace to the
          > > selected/highlighted text.
          >
          >
          >I like this approach to reducing the snakes venom....
          >
          > > Here is the changed clip:
          > >
          > > H="Remove Trailing Spaces"
          > > ;Larry Thomas <larryt@...>
          > > ;06/01/2003, 09:24:11 AM
          > > ;With help from "Alec Burgess" <burale@...>
          > > ;and "Mark B." <breaumark@...>
          > > ^!Select All
          > > ^!Replace "\s+\n" >> "\n" HISAR
          > > ^!Jump 1


          Trailing blanks;

          If you check View/Options/Documents/Trim White Spaces, then, if/when
          using the clip editor Trailing Blanks are automatically deleted when the
          clip is saved and the editor closed.

          When editing a clip/clipbook that is Open As A Document trailing blanks
          are deleted in the copy saved to disk, not in the visible copy. If you
          close and reload the clipbook trailing blanks will be gone.

          For the occasions when you don't want to close/reopen a file the clip
          below will remove trailing blanks from a selected area. You can select
          this area either before or during clip execution.

          The clip displays a banner to remind you to make a selection to operate
          on. The trigger action may be changed from a 'copy' action to a
          "keypress" by changing the comment semicolon of the 'IfFalse and IfTrue'
          commands.

          hrs

          H="Remove Trailing Spaces"
          ; make selection, run clip
          ; Hugo's replace regexp with
          ; current options works
          ; on selected text only
          ^!Set %ww%=^$IsWordWrap$
          ^!SetWordWrap 0
          ^!IfCancel END
          ;¯¯¯¯¯¯¯¯¯¯¯¯\
          ^!SetClipboard ^%Empty%
          ^!StatusShow Select and Copy area to remove Spaces...
          :EWL
          ^!SetHintInfo SELECT AND COPY AREA TO REMOVE SPACES...
          ^!Delay 1
          ;
          ^!IfTrue ^$IsEmpty(^$GetClipboard$)$ EWL
          ;^!IfFalse ^$IsCtrlKeyDown$ EWL
          ;^!IfFalse ^$IsShiftKeyDown$ EWL
          ;____________/
          ^!Set %gr%=^$GetRow$
          ^!Replace "\s+\n" >> "\n" HRSA
          ^!Jump ^%gr%
          :END
          ^!SetWordWrap ^%ww%
        • Larry Thomas
          Hi Harvey, ... I think your clip will work just fine although I think mine is simpler. It is possible that Bob wanted to manually select the lines that he
          Message 4 of 6 , Jun 1, 2003
          • 0 Attachment
            Hi Harvey,

            At 12:53 PM 6/1/03 -0500, you wrote:
            >Trailing blanks;
            >
            >If you check View/Options/Documents/Trim White Spaces, then, if/when
            >using the clip editor Trailing Blanks are automatically deleted when the
            >clip is saved and the editor closed.
            >
            >When editing a clip/clipbook that is Open As A Document trailing blanks
            >are deleted in the copy saved to disk, not in the visible copy. If you
            >close and reload the clipbook trailing blanks will be gone.
            >
            >For the occasions when you don't want to close/reopen a file the clip
            >below will remove trailing blanks from a selected area. You can select
            >this area either before or during clip execution.
            >
            >The clip displays a banner to remind you to make a selection to operate
            >on. The trigger action may be changed from a 'copy' action to a
            >"keypress" by changing the comment semicolon of the 'IfFalse and IfTrue'
            >commands.

            I think your clip will work just fine although I think mine is simpler. It
            is possible that Bob wanted to manually select the lines that he wanted
            trimmed and that is why he removed the select all line. I do like the idea
            of setting the options to Trim Blanks very much though and I have now set
            mine to do so. I have tried it and it appears to work very well and it
            does not fail as Modify/Line/Trim Blanks does.

            Thank you Harvey.

            Regards,

            Larry
            larryt@...
          • Bob Gorman
            ... This I did not know. ... Again, thanks for the new info. Bob It is easier to build strong children than to repair broken men ....Frederick Douglass
            Message 5 of 6 , Jun 1, 2003
            • 0 Attachment
              At 01:07 PM 6/1/2003, you wrote:


              >Welll, ok but you have removed the safety feature. If nothing is selected,
              >the clip will still replace everthing in the library starting from the clip
              >to the end of the library.

              This I did not know.

              >But ^!Select All is necessary if you want to
              >restrict your replace to the current clip because select all will not
              >select the whole library but only the clip in the clip editor window. And
              >as I said before, if you have nothing selected, then the H option has no
              >effect at all. It is just ignored.

              Again, thanks for the new info.

              Bob

              It is easier to build strong children than to repair broken men
              ....Frederick Douglass


              [Non-text portions of this message have been removed]
            Your message has been successfully submitted and would be delivered to recipients shortly.