On Sun, 18 Jun 2006 at 11:26pm, Bram Moolenaar wrote:
>
> 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.
Thank you.
>
> > 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.
>
Does this mean, the documentation will be updated as well? As I said,
the documentation on FileChangedShell suggests that the user can do
something that is no longer possible in Vim7. I am talking specifically
about this:
>>>>
This is useful for reloading related buffers
which are affected by a single command.
<<<<
This is not possible anymore (or am I missing something?).
--
Thanks,
Hari
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com