On Wed, 27 Sep 2006 at 9:53pm, Bram Moolenaar wrote:

>
> Hari Krishna Dara wrote:
>
> > > > I am observing that the taglist() function is not sensitive to the
> > > > changes in 'tags' value. It also seems to cache the value of 'tags' as
> > > > of the time the function is called for the first time. To reproduce the
> > > > problem (you need to have patch 96 applied, otherwise there is another
> > > > bug in 7.0GA that could mask the bug that the below is trying to show),
> > > >
> > > > - create a directory with at least one file that ctags recognizes. Make
> > > >   a copy of this directory.
> > > > - Run ctags in both directories to create tags file. They will
> > > >   essentially be identical.
> > > > - Start vim/gvim and cd to one of the directories. Have 'tags' set to
> > > >   "./tags".
> > > > - Execute taglist() on a tag that you know exists, something like:
> > > >     :echo taglist('main')
> > > > - Now, cd into the other directory, and run the same command. You will
> > > >   see that the tags are reported from the other directory.
> > > > - Change 'tags' to the absolute path to the second directory and run
the
> > > >   echo command again. You will still observe that taglist() is using
the
> > > >   previous tags file.
> > > >
> > > > Can anyone confirm that they can reproduce this?
> > >
> > > Did you take into account that Vim uses "./tags" as the tags file
> > > relative to the current file?  Try editing another file after the ":cd"
> > > command.  Or use the value "tags", which means the tags file in the
> > > current directory.
> >
> > Frankly speaking I didn't know that ./tags is relative to the current
> > file (I was expecting it to be relative to the current directory),
> > however that makes no difference to this bug.
> > - when you run taglist() in the above steps, there is no file opened.
> > - I repeated the experiment with just "tags" as the value for 'tags'.
> > - I also tried hardcoding the tags value to the absolution paths of both
> >   tags files, something like: "c:/tmp/t1/tags,c:/tmp/t2/tags" and later
> >   changing it to something like "c:/tmp/t1/tags", but it continues to
> >   show results from both tags files.
>
> Using Vim with patch 7.0.096 it works just fine for me.  I can only
> explain the behavior when 'tags' is set to "./tags".  The result of
> taglist() is not cached.

I am using taglist() from lookupfile plugin and find that changing the
tags value for looking up files doesn't have an impact on the results.
While debugging I verified that the right value is getting set to 'tags'
setting, but still it returns results for the prior 'tags' value. I also
couldn't reproduce this in a standalone environment (like calling
taglist() from command-line), I apologize for wasting your time. I need
to spend some more time to isolate the problem.

-- 
Thanks,
Hari

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to