give cscope full path
$ find `pwd` | cscope -i -
On Friday, May 31, 2013 3:41:05 PM UTC+8, A. S. Budden wrote:
> Forwarding to vim-dev as requested by Bram... any cscope/vim experts here?
>
> Al
>
> ---------- Forwarded message ----------
> From: Bram Moolenaar
> Date: 22 May 2013 22:02
> Subject: Re: Bug: cscope interface should use absolute paths
> To: A. S. Budden
>
> Al -
>
> > When using cscope, the path as provided to the "cs add" command is
> > used. If the working directory changes, this is potentially no longer
> > valid. This causes me a problem as I have a plugin that tries to
> > pause cscope and restart it (so it can regenerate cscope.out without
> > access conflicts). It does this by parsing "cs show" to get the file
> > name(s) and then doing "cs kill" to pause and "cs add" to restart. If
> > the working directory has changed, "cs add" fails.
> >
> > I think the fix is relatively simple: make "cs add filename" do the
> > equivalent of "exe 'cs add' fnamemodify('filename', ':p')", but I
> > don't know how to do that in Vim's code.
> >
> > An example of the issue can easily be produced with the following
> > example (on Windows):
> >
> > * Create c:\proj1\test1.c with a simple function (I used void test1(void) {
> > })
> > * Create c:\proj2\test2.c with another simple function (I used void
> > test2(void) { })
> > * In each directory (c:\proj1 and c:\proj2), run "cscope -b" to create
> > cscope.out
> >
> > First attempt (doesn't work):
> >
> > gvim -u NONE -U NONE
> > :cd c:\proj1
> > :e test1.c
> > :cs add cscope.out
> > :vnew
> > :lcd c:\proj2
> > :e test2.c
> > :cs add cscope.out
> > :cs show
> > # Only shows one entry: cscope.out
> >
> > Second attempt (works):
> >
> > gvim -u NONE -U NONE
> > :cd c:\proj1
> > :e test1.c
> > :cs add c:\proj1\cscope.out
> > :vnew
> > :lcd c:\proj2
> > :e test2.c
> > :cs add c:\proj2\cscope.out
> > :cs show
> > # Shows two entries, one for each project
> >
> > bugreport.txt attached as per the instructions in the documentation.
>
> I think this was discussed before. Can you please send this to the
> vim_dev list? I haven't done much on cscope myself. Hopefully someone
> else knows.
>
> - Bram
--
--
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/groups/opt_out.