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

Re: Patch: Error message when pattern not found in :g/re/

Expand Messages
  • Bram Moolenaar
    ... I think this is a Vi compatibility thing. It is not really an error, the message is just a warning that nothing happened. I don t think we should change
    Message 1 of 5 , Mar 4, 2013
      David B├╝rgin wrote:

      > This patch fixes the following item from the todo list:
      >
      > 8 ":g//" gives "Pattern not found error" with E486. Should not
      > use the error number, it's not a regular error message.
      >
      > On the contrary, an error message with error highlighting *should* be
      > output to be consistent with the other search commands. The other search
      > commands all give an error message with error code in this situation:
      >
      > /nil<CR> E486: Pattern not found ...
      > :s/nil/ E486: Pattern not found ...
      > :/nil/,/nil/g/re/p E486: Pattern not found ...
      > :vimgrep /nil/ * E480: No match ...
      > :tag nil E426: tag not found ...
      >
      > The attached patch fixes this inconsistency.

      I think this is a Vi compatibility thing. It is not really an error,
      the message is just a warning that nothing happened.
      I don't think we should change it. It might look more consistent, but
      it may make some existing scripts fail.

      --
      How To Keep A Healthy Level Of Insanity:
      3. Every time someone asks you to do something, ask if they want fries
      with that.

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ an exciting new programming language -- http://www.Zimbu.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • glts
      ... Here is another attempt: This time I solved the problem as described in the todo list: remove the error code since it is not a proper error message. I d be
      Message 2 of 5 , Mar 5, 2013
        Bram Moolenaar wrote:
        > I think this is a Vi compatibility thing. It is not really an error,
        > the message is just a warning that nothing happened.
        > I don't think we should change it. It might look more consistent, but
        > it may make some existing scripts fail.

        Here is another attempt: This time I solved the problem as described in
        the todo list: remove the error code since it is not a proper error
        message.

        I'd be happy to see this item crossed off the list. Thanks.

        --
        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Bram Moolenaar
        ... Thanks. I ll include it unless someone objects. -- How To Keep A Healthy Level Of Insanity: 12. Sing along at the opera. /// Bram Moolenaar --
        Message 3 of 5 , Mar 5, 2013
          Glts wrote:

          > Bram Moolenaar wrote:
          > > I think this is a Vi compatibility thing. It is not really an error,
          > > the message is just a warning that nothing happened.
          > > I don't think we should change it. It might look more consistent, but
          > > it may make some existing scripts fail.
          >
          > Here is another attempt: This time I solved the problem as described in
          > the todo list: remove the error code since it is not a proper error
          > message.
          >
          > I'd be happy to see this item crossed off the list. Thanks.

          Thanks. I'll include it unless someone objects.


          --
          How To Keep A Healthy Level Of Insanity:
          12. Sing along at the opera.

          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
          \\\ an exciting new programming language -- http://www.Zimbu.org ///
          \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

          --
          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        Your message has been successfully submitted and would be delivered to recipients shortly.