On 2 July 2017, Yegappan Lakshmanan <[email protected]> wrote:
> Hi,
>
> On Sun, Jul 2, 2017 at 6:45 AM, LCD 47 <[email protected]> wrote:
> > On 1 July 2017, Yegappan Lakshmanan <[email protected]> wrote:
> >> Hi all,
> >>
> >> When one plugin is asynchronously updating a quickfix list,
> >> currently it is not possible for another plugin to update another
> >> quickfix list synchronously or asynchronously using the cexpr,
> >> cfile, and other commands. The setqflist() function can update any
> >> quickfix list in the stack. But this function currently doesn't
> >> support parsing output using 'errorformat'.
> >>
> >> For example, let us say one plugin asynchronously updates the
> >> quickfix list with a build tool output. Now if the user runs a
> >> query command to create and update another quickfix list, then both
> >> the plugins will end up updating the same quickfix list.
> >
> > What do you mean by "asynchronously" in this context? Vim is
> > single threaded, as far as I can tell there is no way to run f.i.
> > two cexpr commands at the same time. Do you have an ecxample of
> > code that fails this way?
> >
>
> A plugin can use ":caddexpr" command to add entries to a quickfix
> list. For example, a plugin can start a build process (which
> takes a long time to complete) in the background using the job
> functionality. As the output lines are available, the plugin can use
> caddexpr to parse the output and add the resulting entries to the
> quickfix list.
>
> While this is running, if the user issues another command (either
> from another plugin or directly using the Vim quickfix commands) that
> creates/updates the quickfix list then the wrong quickfix list will be
> updated by the previous command. This is because the caddexpr command
> can add entires only to the last quickfix list in the stack.
Ok, so the problem is not cexpr, which creates the full quickfix
list in a single run, but rather interspersed calls to caddexpr (and
friends) from different plugins, each plugin trying to update its
own quickfix list on the fly. Then perhaps what's missing is a set
of functions that can create / edit / delete quickfix lists outside
the stack altogether. This would be quite useful, it would allow
"preprocessing" errors before "publishing" them. Just being able to
change things on the stack only at well-defined checkpoints would be a
lot more hygienic for the plugin writers, IMO.
/lcd
--
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.