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

Re: [Clip] Trailing Spaces - 2

Expand Messages
  • Larry Thomas
    Hi David, This clip is better than the last one. It replaces any number of spaces at the end of all lines in a clip so that you have all clip lines ending in
    Message 1 of 7 , May 30 9:54 PM
    • 0 Attachment
      Hi David,

      This clip is better than the last one. It replaces any number of spaces at
      the end of all lines in a clip so that you have all clip lines ending in a
      newline pair. If you should need spaces at the end of a line, you should
      add them after you run this clip.

      H="Remove Trailing Spaces"
      ^!Jump 1
      :Loop
      ^!Replace "\s*\n" >> "\n" TISAR
      ^!IfError Exit ELSE Loop

      Regards,

      Larry
      larryt@...
    • Dick Gascoigne
      Larry / Jody / David / Ray - And probably some others... Darn, I didn t keep the non-working version. It sounds like you hit on the problem, tho. Now I
      Message 2 of 7 , May 30 11:05 PM
      • 0 Attachment
        Larry / Jody / David / Ray -

        And probably some others...

        Darn, I didn't keep the non-working version. It sounds like you hit on the
        problem, tho. Now I remember having had that problem a couple of years ago.

        I like Larry's 'remove spaces' clip -- it is going right on my toolbar.

        Thanks to all for your contribution to the solution.

        Dick Gascoigne
        Singapore
      • Bob Gorman
        was: Re: [Clip] Trailing Spaces - 2 ... I copied it to the clipboard, and pasted it into a clip library. I tried it and it worked fine. I then dragged it to
        Message 3 of 7 , May 31 10:55 AM
        • 0 Attachment
          was: Re: [Clip] Trailing Spaces - 2
          At 12:54 AM 5/31/2003, Larry wrote:
          >Hi David,
          >
          >This clip is better than the last one.

          >H="Remove Trailing Spaces"
          >^!Jump 1
          >:Loop
          >^!Replace "\s*\n" >> "\n" TISAR
          >^!IfError Exit ELSE Loop

          I copied it to the clipboard, and pasted it into a clip library.
          I tried it and it worked fine.

          I then dragged it to my clipbar, and changed the icon.

          From the clip library it works fine.
          From the Clip bar it does nothing!!!

          Did I do something wrong?

          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]
        • Alan C.
          ... H= Remove Trailing Spaces ^!Replace s* n n TISWAR W with A option(s) should also do all in a doc but without the need for a loop construct. ... I
          Message 4 of 7 , May 31 12:28 PM
          • 0 Attachment
            On Sat, 31 May 2003 13:55:30 -0400, Bob Gorman wrote:
            >was: � �Re: [Clip] Trailing Spaces - 2
            >At 12:54 AM 5/31/2003, Larry wrote:
            >>Hi David,
            >>
            >>This clip is better than the last one.
            >
            >>H="Remove Trailing Spaces"
            >>^!Jump 1
            >>:Loop
            >>^!Replace "\s*\n" >>�"\n" TISAR
            >>^!IfError Exit ELSE Loop

            H="Remove Trailing Spaces"
            ^!Replace "\s*\n" >> "\n" TISWAR


            W with A option(s) should also do all in a doc but without the need for a loop construct.

            >
            >I copied it to the clipboard, and pasted it into a clip library.
            >I tried it and it worked fine.
            >
            >I then dragged it to my clipbar, and changed the icon.
            >
            >From the clip library it works fine.
            >From the Clip bar it does nothing!!!
            >
            I just tried it with the orig little paper clip icon. and it works fine.

            right click the clipbar orig icon then choose properties to see that two fields ie

            library name
            clip name

            data in each of those fields must remain unaltered no matter what icon used.

            if it don't work for U with drag to clipbar the orig icon then yours acts different than mine (NoteTab Pro)

            --
            Alan.
          • Bob Gorman
            ... They are all Ok. I added the W but it put it into a loop that I needed Ctrl-Alt to terminate, so I removed the W . It now works fine from both the clip
            Message 5 of 7 , May 31 1:24 PM
            • 0 Attachment
              At 03:28 PM 5/31/2003, Alan wrote:
              >On Sat, 31 May 2003 13:55:30 -0400, Bob Gorman wrote:
              >
              >H="Remove Trailing Spaces"
              >^!Replace "\s*\n" >> "\n" TISWAR
              >
              >W with A option(s) should also do all in a doc but without the need for a
              >loop construct.

              >I just tried it with the orig little paper clip icon. and it works fine.
              >right click the clipbar orig icon then choose properties to see that two
              >fields ie
              >
              >library name
              >clip name
              >
              >data in each of those fields must remain unaltered no matter what icon used.

              They are all Ok.

              I added the "W" but it put it into a loop that I needed Ctrl-Alt to
              terminate, so I removed the "W".

              It now works fine from both the clip library AND the clip bar,
              so need to waste further neuronal activity on it.

              Yes, I have (NoteTab Pro)

              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, ... I am really not sure what is wrong here unless it is with the RegExp engine in NoteTab. I have deleted this clip from my library without testing
              Message 6 of 7 , May 31 1:35 PM
              • 0 Attachment
                Hi Bob,

                At 01:55 PM 5/31/03 -0400, you wrote:
                >was: Re: [Clip] Trailing Spaces - 2
                >At 12:54 AM 5/31/2003, Larry wrote:
                >>Hi David,
                >>
                >>This clip is better than the last one.
                >
                >>H="Remove Trailing Spaces"
                >>^!Jump 1
                >>:Loop
                >>^!Replace "\s*\n" >> "\n" TISAR
                >>^!IfError Exit ELSE Loop
                >
                >I copied it to the clipboard, and pasted it into a clip library.
                >I tried it and it worked fine.
                >
                >I then dragged it to my clipbar, and changed the icon.
                >
                > From the clip library it works fine.
                > From the Clip bar it does nothing!!!

                I am really not sure what is wrong here unless it is with the RegExp engine
                in NoteTab. I have deleted this clip from my library without testing it on
                the clipbar. Because I realized that there was a better way from one of
                the other posters. I have run this clip on the clipbar and it really does
                work for me each and every time I run it whether from the clipbar or from
                the open clipbook panel.

                H="Remove Trailing Spaces"
                ;Larry Thomas <larryt@...>
                ;05/31/2003, 11:25:12 AM
                ^!Select All
                ^!Menu Modify/Lines/Trim Blanks
                ^!Jump1

                Regards,

                Larry
                larryt@...
              • Alec Burgess
                Bob (I think you were the original poster in this thread?) ... I suspect the problem with it might be that the construct s* n will ALWAYS be satisfied on
                Message 7 of 7 , May 31 8:47 PM
                • 0 Attachment
                  Bob (I think you were the original poster in this thread?)

                  >> H="Remove Trailing Spaces"
                  >> ^!Replace "\s*\n" >> "\n" TISWAR

                  > I added the "W" but it put it into a loop that I needed
                  > Ctrl-Alt to terminate, so I removed the "W".

                  I suspect the problem with it might be that the construct "\s*\n" will
                  ALWAYS be satisfied on EVERY line even with no trailing spaces: "*" matches
                  zero or more occurances of the token before the "*".

                  Hence it should be "\s+\n" >> "\n" which should replace all trailing spaces
                  in one go without needing loops.

                  Also: I think with regexps the "T" option is meaningless - I don't believe
                  it makes any difference whether present or absent.

                  Regards ... Alec
                  --

                  ---- Original Message ----
                  From: "Bob Gorman" <bgorman@...>
                  To: <ntb-clips@yahoogroups.com>
                  Sent: Saturday, May 31, 2003 16:24
                  Subject: Re: [Clip] Clip bar

                  > At 03:28 PM 5/31/2003, Alan wrote:
                  >> On Sat, 31 May 2003 13:55:30 -0400, Bob Gorman wrote:
                Your message has been successfully submitted and would be delivered to recipients shortly.