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

Re: Clip Error Question

Expand Messages
  • Sheri
    You need to provide a document sample to better demonstrate what you are talking about. You don t even say what kind of clip error you got. BTW, you can copy
    Message 1 of 6 , May 9, 2011
    • 0 Attachment
      You need to provide a document sample to better demonstrate what you are talking about. You don't even say what kind of clip error you got.

      BTW, you can copy any error message. Just click on an error dialog and press Ctrl+C to copy its text to the clipboard.

      I would also suggest to include sample before and after texts to demonstrate what you are trying to achieve.

      Regards,
      Sheri
    • John Shotsky
      My question wasn t really so much about how to fix this problem, but to tell me if I was doing something wrong. I don t think I am or I wouldn t have written.
      Message 2 of 6 , May 9, 2011
      • 0 Attachment
        My question wasn't really so much about how to fix this problem, but to tell me if I was doing something wrong. I don't
        think I am or I wouldn't have written.



        Thanks for the tip about copying the error. I had no idea it would copy. It just beeps, but it copies. Below, I
        reproduce it. Where you see the \9A, there is a ^[.

        The whole clip is:

        ^!Replace "^[\dA-Z].+\K\[\.\](.+[A-Za-z][A-Za-z][A-Za-z][A-Za-z]\d\d[A-Za-z])" >> "\.$1" ARSTW

        ---------------------------

        Error

        ---------------------------

        Line 118; Clip syntax error:

        REPLACE "\9A-100].+\K\[\.\](.+[A-100a-100][A-100a-100][A-100a-100][A-100a-100]\9\9[A-100a-100]) >> \.$1 ARSTW

        ---------------------------

        OK

        ---------------------------

        (the numbers you see above are different for each run of the error.)



        This error didn't occur when the clip in question was placed in a clip by itself on my computer. The text file which can
        produce the error is any line of text as below.

        one line of text



        Here are the pertinent lines in my clip library. I added a jump from the top to that clip, so there are no active
        preceding clips. The GoTo is the very first active clip.

        ^!GoTo Error

        ;Jumps around the preceding clips.

        :Error

        ;This clip produces an error unless the ^ is removed, or () is added to the first range. Not understood.

        ^!Replace "^[\dA-Z].+\K\[\.\](.+[A-Za-z][A-Za-z][A-Za-z][A-Za-z]\d\d[A-Za-z])" >> "\.$1" ARSTW

        ^!GoTo Exit

        The error reproduces every time when it is jumping around the preceding 100+ lines. I tried closing and reopening
        NoteTab. No help. If I copy just these lines to a separate clip, no error. So I don't expect anyone to be able to
        duplicate this error. Back to my original question: Is there some unwritten rule about following the caret with a range
        without using parens?



        Regards,

        John

        <http://recipetools.gotdns.com/> RecipeTools site

        <http://groups.yahoo.com/group/RecipeTools/> RecipeTools Yahoo group

        <http://shotsky.gotdns.com/index.htm> Beaverton Weather



        From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Sheri
        Sent: Monday, May 09, 2011 10:48
        To: ntb-clips@yahoogroups.com
        Subject: [Clip] Re: Clip Error Question





        You need to provide a document sample to better demonstrate what you are talking about. You don't even say what kind of
        clip error you got.

        BTW, you can copy any error message. Just click on an error dialog and press Ctrl+C to copy its text to the clipboard.

        I would also suggest to include sample before and after texts to demonstrate what you are trying to achieve.

        Regards,
        Sheri





        [Non-text portions of this message have been removed]
      • Sheri
        ... I can t say if the pattern is wrong since I don t know what you mean it to match. The replace command as written looks ok except that the T option is not
        Message 3 of 6 , May 9, 2011
        • 0 Attachment
          --- In ntb-clips@yahoogroups.com, "John Shotsky" <jshotsky@...> wrote:
          >
          > My question wasn't really so much about how to fix this problem, but to tell me if I was doing something wrong. I don't
          > think I am or I wouldn't have written.

          I can't say if the pattern is wrong since I don't know what you mean it to match. The replace command as written looks ok except that the T option is not applicable to a replace command that is a regex.

          See if it happens on NoteTab Standard or Light. As documented in the regex.chm file, Notetab Pro does do extra processing when the first character of a pattern used in a clip is a caret.

          Other than that, over the years I have occasionally had a clip library become corrupted somehow. Try copying the clips to another library and see if still recurs.

          If it only happens on your computer, it could also possibly be hardware related. I was not able to reproduce.

          Regards,
          Sheri
        • John Shotsky
          I tried copying to a completely new document with a different name, and got the same problem. I removed the T with no change. The pattern is irrevalent. It
          Message 4 of 6 , May 9, 2011
          • 0 Attachment
            I tried copying to a completely new document with a different name, and got the same problem. I removed the T with no
            change.

            The pattern is irrevalent. It doesn't matter what is in the text file, even just a few words is sufficient to cause the
            problem. I just tried it with a blank doc and got the same error. But, the pattern is LLLLNNL, case insensitive, which
            is a Prodigy ID.



            My clip library is over 900K, which may play into it. It will be reduced by about 1/3 as I finish rewriting it. The
            funny part is that if I copy just the active lines to a new clip, it doesn't happen. And, if I either remove the caret,
            or enclose the first range in parens, the problem is gone.



            I don't have another version installed, and don't want to upset my install by installing another version. I'm on Win7-64
            bit. 8G memory, Quad core.



            Regards,

            John

            <http://recipetools.gotdns.com/> RecipeTools site

            <http://groups.yahoo.com/group/RecipeTools/> RecipeTools Yahoo group

            <http://shotsky.gotdns.com/index.htm> Beaverton Weather



            From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Sheri
            Sent: Monday, May 09, 2011 19:58
            To: ntb-clips@yahoogroups.com
            Subject: [Clip] Re: Clip Error Question





            --- In ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com> , "John Shotsky" <jshotsky@...> wrote:
            >
            > My question wasn't really so much about how to fix this problem, but to tell me if I was doing something wrong. I
            don't
            > think I am or I wouldn't have written.

            I can't say if the pattern is wrong since I don't know what you mean it to match. The replace command as written looks
            ok except that the T option is not applicable to a replace command that is a regex.

            See if it happens on NoteTab Standard or Light. As documented in the regex.chm file, Notetab Pro does do extra
            processing when the first character of a pattern used in a clip is a caret.

            Other than that, over the years I have occasionally had a clip library become corrupted somehow. Try copying the clips
            to another library and see if still recurs.

            If it only happens on your computer, it could also possibly be hardware related. I was not able to reproduce.

            Regards,
            Sheri





            [Non-text portions of this message have been removed]
          • John Shotsky
            This problem has been solved, with the excellent detective work of Dio. The cause of the problem occurs in a line that is after the GoTo Exit that I placed to
            Message 5 of 6 , May 10, 2011
            • 0 Attachment
              This problem has been solved, with the excellent detective work of Dio. The cause of the problem occurs in a line that
              is after the GoTo Exit that I placed to stop operation, which is why I would not have looked past that point. In this
              case, that other line has a caret inside a character class:



              ^!Replace "\b(\d{3})[\"\'\*~\^](\x20|\.|\))" >> "$1°$2" ARSTW



              That character, just by being before the ], and even though it is escaped, causes NT to misconstrue the ], which then
              causes the problem way upstream. The solution is to use the hex notation, or move the caret away from the ]. Apparently,
              NT reads the entire clip library, and somehow gets confused with that caret in that location.



              If you're wondering what that clip does, it replaces some of the different symbols I've found that people use for the
              degree symbol in recipes with the real degree symbol. Others are fixed at the character level, but these need context to
              detect them.



              Thanks again Dio and all,

              John



              From: John Shotsky [mailto:jshotsky@...]
              Sent: Monday, May 09, 2011 10:05
              To: ntb-clips@yahoogroups.com
              Subject: Clip Error Question



              I am getting a syntax error on a clip but I don't understand what I'm doing wrong.

              The clip is supposed to remove brackets around a period [.] when followed by a specific pattern.

              The \K is in place to not capture the first part, and parens are around the second part to capture it.

              However, if I don't use parens around the first range, it gives an error

              ^!Replace "^[\dA-Z].+\K\[\.\](.+[A-Za-z][A-Za-z][A-Za-z][A-Za-z]\d\d[A-Za-z])" >> "\.$1" AIRSTW



              If I put parens around the first range, it works normally.

              ^!Replace "^([\dA-Z]).+\K\[\.\](.+[A-Za-z][A-Za-z][A-Za-z][A-Za-z]\d\d[A-Za-z])" >> "\.$2" AIRSTW



              If I remove the caret ^, it also doesn't produce an error without the parens.



              Note that the pattern I'm trying to capture isn't present in the text – this is a clip syntax error. As I look at the
              error string, it is clear that the first [ is being interpreted as a literal character instead of the beginning of a
              range, because it gives a number followed by the close range. (]) (and then all the other ranges do the same thing.) I
              don't know if that's my error or a NoteTab error. Can you not reliably start a range at the beginning of a line unless
              it is within parens?



              This all came about as I was doing some code cleanup, removing parens before \K when not needed. When I tested, this
              came up, and replacing the parens or removing the caret were the only ways to get it to work. I looked in the help but
              didn't see anything that applied.



              Oh, and by the way, it would be great if error messages could by copied as text…



              Thanks,

              John





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