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. - Yegappan > > /lcd > >> This is because the commands like cexpr, cfile, etc. use the >> qf_init_ext() function to parse the output and add entries to the >> quickfix list. The qf_init_ext() function supports updating only the >> last quickfix list. >> >> This problem can be solved by changing the qf_init_ext() function to >> operate on any quickfix list in the stack. But this function currently >> saves state information across multiple invocations to support >> directory/file stack and multi-line error output. This state information >> is stored in qf_info_S (entire quickfix stack) instead of qf_list_T (per >> list). This state information needs to be stored per quickfix list by >> moving to qf_list_T. Does anyone see any issues with this or any other >> suggestions? > -- -- 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.
