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.

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).

-- 
Thanks,
Hari

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to