2016-08-12 14:36 GMT+03:00 Nicola <[email protected]>: > On 2016-08-12 09:33:08 +0000, h_east said: > >> Hi Bram, >> >> 2016-8-11(Thu) 5:32:16 UTC+9 Bram Moolenaar: >>> >>> Hirohito Higashi wrote: >>> >>>> Hi Bram and list, >>>> >>>> 2016-8-9(Tue) 6:27:17 UTC+9 Bram Moolenaar: >>>>> >>>>> Kent Sibilev wrote: >>>>> >>>>>> On Saturday, August 6, 2016 at 1:02:18 PM UTC-4, Bram Moolenaar wrote: >>>>>>> >>>>>>> >>>>>>> The problem with this solution is that the names are translated. >>>>>>> A more direct solution would be better. >>>>>>> >>>>>>> The 'buftype' option is "quickfix" for both quickfix and location >>>>>>> list. >>>>>>> We can't change that without causing problems. >>>>>>> >>>>>>> Perhaps we should add a buftype({expr}) function, that can get the >>>>>>> buffer type of any buffer, and make a difference between "quickfix" >>>>>>> and >>>>>>> "loclist". >>>>>> >>>>>> >>>>>> I see. Even though it's quite awkward to add a new function just to >>>>>> accommodate this particular case, i'm attaching my attempt to >>>>>> implement it. >>>>> >>>>> >>>>> Yes, it is unexpected to have this function. But I can see it's >>>>> useful. >>>>> Would there be a better solution somehow? >>>>> Perhaps using one of the existing quickfix functions? >>>> >>>> >>>> Do you remember this thread? >>>> >>>> We can't handle type which it's quickfix or location-list. >>>> https://groups.google.com/d/msg/vim_dev/GIjn9QRyLag/M_8AJ5_UkMoJ >>>> >>>> It also listed on the TODO. >>>> TODO> Patch to check whether a buffer is quickfix or a location list. >>>> TODO> (Yasuhiro Matsumoto, 2014 Dec 9) >>>> >>>> I've arranged with several correct mistakes of this patch. >>>> It will be `w:quickfix_type` is set. In the same way as the >>>> `w:quickfix_title`. >>>> The values are 'quickfix' or 'location'. >>>> >>>> What about an attached patch? >>> >>> >>> I think we should avoid adding more w: variables. They can interfere >>> with what a user sets. The more we add the bigger the chance that it >>> goes wrong. >> >> >> Okay. I understand. >> Let's remove the following one from Todo list. >> >> TODO> Patch to check whether a buffer is quickfix or a location list. >> TODO> (Yasuhiro Matsumoto, 2014 Dec 9) > > > Wouldn't it be possible to expose the %q value of the status line > through a function (say, expand("<qf>"))?
How is this supposed to help? Remember that %q is *translated* and thus cannot be used for checking. Also exposing this was already discussed. > > Nicola > > > > -- > -- > 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. -- -- 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.
