Re: taglist() bugs related to 'tags'

2006-09-29 Thread Hari Krishna Dara

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 


Re: taglist() bugs related to 'tags'

2006-09-27 Thread Bram Moolenaar

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.

-- 
CART DRIVER: Bring out your dead!
   There are legs stick out of windows and doors.  Two MEN are fighting in the
   mud - covered from head to foot in it.  Another MAN is on his hands in
   knees shovelling mud into his mouth.  We just catch sight of a MAN falling
   into a well.
 Monty Python and the Holy Grail PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: taglist() bugs related to 'tags'

2006-09-26 Thread Bram Moolenaar

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.

-- 
ERIC IDLE PLAYED: THE DEAD COLLECTOR, MR BINT (A VILLAGE NE'ER-DO -WELL VERY
  KEEN ON BURNING WITCHES), SIR ROBIN, THE GUARD WHO DOESN'T
  HICOUGH BUT TRIES TO GET THINGS STRAIGHT, CONCORDE (SIR
  LAUNCELOT'S TRUSTY STEED), ROGER THE SHRUBBER (A SHRUBBER),
  BROTHER MAYNARD
 Monty Python and the Holy Grail PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: taglist() bugs related to 'tags'

2006-09-26 Thread Hari Krishna Dara

On Tue, 26 Sep 2006 at 11:03am, 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.

-- 
Thanks,
Hari

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


taglist() bugs related to 'tags'

2006-09-25 Thread Hari Krishna Dara

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?

-- 
Thanks,
Hari

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