On Oct 8, 1:56 pm, Marcin Szamotulski <[email protected]> wrote: > 21:49 Fri 07 Oct , sinbad wrote: > > > > > > > > > > > On Oct 5, 11:41 am, sinbad <[email protected]> wrote: > > > On Oct 3, 6:26 pm, sinbad <[email protected]> wrote: > > > > > On Sep 30, 10:07 pm, sinbad <[email protected]> wrote: > > > > > > On Sep 30, 8:34 pm, Tony Mechelynck <[email protected]> > > > > > wrote: > > > > > > > On 30/09/11 08:44, sinbad wrote: > > > > > > > > hi, > > > > > > > > i am trying to store the contents of location list, so as to use > > > > > > > multiple location lists for the same split-window window. > > > > > > > here is what i did. created a location list for some pattern. > > > > > > > now i ran the following commands in vi. > > > > > > > I hope you mean Vim, and in 'nocompatible' mode. Legacy vi has no > > > > > > quickfix capabilities. > > > > > > > > :let x= getloclist(0) > > > > > > > :callsetloclist(0, x, 'r') > > > > > > > > location-list is screwed up, i can see some contents in the > > > > > > > location > > > > > > > list > > > > > > > with filename missing. is it the rightway of using > > > > > > > get/setloclist() > > > > > > > functions. > > > > > > > > thanks > > > > > > > Does it work if you omit the ,'r' (last argument ofsetloclist())? > > > > > > > Best regards, > > > > > > Tony. > > > > > > -- > > > > > > Do what comes naturally now. Seethe and fume and throw a tantrum. > > > > > > I tried that, it doesn't work too. when i print the stored list 'x' it > > > > > seems to have > > > > > all the values properly. but after i usesetloclist(0,x) and open the > > > > > location list > > > > > the valid bit is set to '0'. i am not sure if i am using it wrongly or > > > > > if there is a > > > > > bug in thesetloclist() function. > > > > > does anyone know of this problem, or i am using it in a wrong way. > > > > can anyone try this out and let me know. btw, i am running vim 7.0 > > > > version. > > > > I tried in vim 7.3, it is not working in version 7.3 as well. > > > i tried with quickfix list, i observed the same problem with > > getqflist() and setqflist() > > functions. > > > :let x = getqflist() > > :setqflist(x, 'r') > > > would make all the quickfix entries a 'dead ones'. > > has anyone used these functions before succesfully. > > if so can point out any mistake i am doing using these > > functions. > > > -- > > You received this message from the "vim_use" maillist. > > Do not top-post! Type your reply below the text you are replying to. > > For more information, visithttp://www.vim.org/maillist.php > > This getloclist() and setloclist() work for me without any problem. > :let x=getloclist(0) > :call setloclist(0, x, 'r') > > There is a difference with getqflist() and setqflist(). The function > setqflist() uses a bit different list than what getqflist() returns (see note > in :help setqflist()) > > Best, > Marcin
does it matter how these entries are created (lgrep, lexpr)...? For filling location lists, the script i am using uses 'lexpr' to populate the location-list entries, the files are C source file. I believe you might have used lgrep or someother command, if you happen to work C code, can you try the same thing works for Cscope results on quickfix or location lists. Clearly It didn't work for me. thanks for checking out for me. -sinbad -- You received this message from the "vim_use" 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
