Hari Krishna Dara wrote: > It seems like I am getting E788 error too often, without much reason. > The latest is for the :compiler command that is being executed from a > ftplugin. I narrowed it down to the command itself, not the compiler > plugin, as adding a :finish at the start of the compiler plugin didn't > get rid off the error, but commenting the :compiler call itself did. > > The problem occurs because I am reloading the buffer during the > FileChangedRO event, and manually triggering the BufRead event, because > for some reason this doesn't get triggered. Actually BufRead event > didn't in prior version also, but I was able to workaround this by > manually triggering FileChangedShell (Bram's suggestion), but this no > longer works properly. If FileChangedShell is triggered from > FileChangedRO, the v:fcs_reason gets ignored, so my workaround is to > just reload the file, and manually fire BufRead event, which is what is > causing the E788 error in this case.
It looks like there is no problem with allowing the ":compiler" command here. This means it can also be used in the command line window. I'll change that. > The previous time I got E788 was in my FileChangedShell handler. Prior > to 7.0, since there was no v:fcs_reason support, I had to jump to the > buffer for which the event got triggered and conditionally reload the > buffer, but now this is no longer allowed. The reason I think this is > too restrictive is that the doc suggests that FileChangedShell is > allowed to reload related buffers, if you know what you are doing, but > you can't reload buffer without first switching to it (and, to repeat, > this causes E788). Vim has to be very careful. There have been several problems and crashes caused by allowing too much in autocommands. I rather stay on the safe side. -- I'm sure that I asked CBuilder to do a "full" install. Looks like I got a "fool" install, instead. Charles E Campbell, Jr, PhD /// 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 ///