Yegappan Lakshmanan wrote: > On 3/6/07, Gary Johnson <[EMAIL PROTECTED]> wrote: > > On 2007-03-07, "A.J.Mechelynck" <[EMAIL PROTECTED]> wrote: > > > Gary Johnson wrote: > > > > If I open a new window, read into it the results of a grep command, > > > > e.g., > > > > > > > > :r !grep -nH somepattern somefileset > > > > > > > > and then try to use that buffer as a quickfix list or location list > > > > with either the :cb or :lb commands, respectively, I get > > > > > > > > E37: No write since last change (add ! to override) > > > > > > > > If I then try to add ! to the :cb or :lb commands, I get > > > > > > > > E477: No ! allowed > > > > > > > > It seems to me that the :cb and :lb commands are missing the ability > > > > to handle a !. > > > > > > > > The most recent version of vim I had to verify this with was > > > > 7.0.178. > > > > > > > > Regards, > > > > Gary > > > > > > > > > > If what you want to do with the output of grep is use it as a quickfix > > > error list, then use ":grep" or ":lgrep" instead of ":r !grep". Or you can > > > also use ":vimgrep" or ":lvimgrep" for internal grep (with Vim-style > > > regexps). > > > > > > See ":help grep". > > > > > > It seems pretty clear that there has been an oversight in the > > implementation of the :cb and :lb commands, even pointed to by the > > text of E37. If there is some reason that the :cb and :lb commands > > should not be extended to accept !, then the current text of E37 is > > inappropriate for that error condition. > > > > Try using the attached patch which enables the "!" modifier for the > ":cbuffer" and ":lbuffer" commands.
Thanks for making this patch. Now the patch for the help file, please? -- GOD: That is your purpose Arthur ... the Quest for the Holy Grail ... "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///