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.



VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 27 2010 17:59:02)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-46
Compiled by Bram@KIBAALE
Big version with GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent 
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff 
+digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi 
+file_in_path +find_in_path +float +folding -footer +gettext/dyn -hangul_input 
+iconv/dyn +insert_expand +jumplist +keymap +langmap +libcall +linebreak 
+lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse 
+mouseshape +multi_byte_ime/dyn +multi_lang -mzscheme +netbeans_intg +ole 
-osfiletype +path_extra +perl/dyn +persistent_undo -postscript +printer 
-profile +python/dyn +python3/dyn +quickfix +reltime +rightleft +ruby/dyn 
+scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop 
+syntax +tag_binary +tag_old_static -tag_any_white +tcl/dyn -tgetent 
-termresponse +textobjects +title +toolbar +user_commands +vertsplit 
+virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu 
+windows +writebackup -xfontset -xim -xterm_save +xpm_w32 
   system vimrc file: "$VIM\vimrc"
     user vimrc file: "$HOME\_vimrc"
 2nd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
  2nd user exrc file: "$VIM\_exrc"
  system gvimrc file: "$VIM\gvimrc"
    user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$VIM\_gvimrc"
    system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32   
-DFEAT_CSCOPE -DFEAT_NETBEANS_INTG   -DFEAT_XPM_W32   -DWINVER=0x0400 
-D_WIN32_WINNT=0x0400  /Fo.\ObjGOLYHTR/ /Ox /GL -DNDEBUG  /Zl /MT -DFEAT_OLE 
-DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT 
-DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl83.dll\" 
-DDYNAMIC_TCL_VER=\"8.3\" -DFEAT_PYTHON -DDYNAMIC_PYTHON 
-DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 
-DDYNAMIC_PYTHON3_DLL=\"python31.dll\" -DFEAT_PERL -DDYNAMIC_PERL 
-DDYNAMIC_PERL_DLL=\"perl512.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY 
-DDYNAMIC_RUBY_VER=191 -DDYNAMIC_RUBY_DLL=\"msvcrt-ruby191.dll\" -DFEAT_BIG 
/Fd.\ObjGOLYHTR/ /Zi
Linking: link /RELEASE /nologo /subsystem:windows /LTCG:STATUS oldnames.lib 
kernel32.lib advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib 
uuid.lib /machine:i386 /nodefaultlib gdi32.lib version.lib   winspool.lib 
comctl32.lib advapi32.lib shell32.lib  /machine:i386 /nodefaultlib libcmt.lib 
oleaut32.lib  user32.lib      /nodefaultlib:python27.lib 
/nodefaultlib:python31.lib   e:\tcl\lib\tclstub83.lib WSock32.lib 
e:\xpm\lib\libXpm.lib /PDB:gvim.pdb -debug
--- Directories and Files ---
$VIM = "c:\vim"
directory "c:\vim" exists
$VIMRUNTIME = "c:\vim\vim73"
directory "c:\vim\vim73" exists
"c:\vim\vim73\doc\help.txt" is readable
"c:\vim\vim73\doc/tags" is readable
"c:\vim\vim73/menu.vim" is readable
"c:\vim\vim73/filetype.vim" is readable
"c:\vim\vim73/syntax/synload.vim" is readable
--- Scripts sourced ---
  1: c:\vim\vim73\menu.vim
  2: c:\vim\vim73\autoload\paste.vim
  3: c:\vim\vim73\bugreport.vim
--- Options ---
  aleph=224           fileencoding=       modelines=5         startofline
noarabic              fileformat=dos      modifiable          statusline=
  arabicshape         filetype=         nomodified            suffixesadd=
noallowrevins       nofkmap             nomore                swapfile
noaltkeymap           foldclose=          mouse=a             swapsync=fsync
  ambiwidth=single    foldcolumn=0      nomousefocus          switchbuf=
noautochdir           foldenable          mousehide           synmaxcol=3000
noautoindent          foldexpr=0          mousemodel=popup    syntax=
noautoread            foldignore=#        mousetime=500       tabline=
noautowrite           foldlevel=0       nonumber              tabpagemax=10
noautowriteall        foldlevelstart=-1   numberwidth=8       tabstop=8
  background=light    foldmethod=manual   omnifunc=           tagbsearch
  backspace=          foldminlines=1    noopendevice          taglength=0
nobackup              foldnestmax=20      operatorfunc=     notagrelative
  backupcopy=auto     formatexpr=       nopaste               tags=./tags,tags
  backupext=~         formatoptions=vt    pastetoggle=        tagstack
  balloondelay=600    formatprg=          patchexpr=          term=builtin_gui
noballooneval       nogdefault            patchmode=        notermbidi
  balloonexpr=        guifont=            path=.,,            termencoding=
nobinary              guifontwide=      nopreserveindent    noterse
nobomb                guipty              previewheight=12    textauto
  browsedir=last      guitablabel=      nopreviewwindow       textmode
  bufhidden=          guitabtooltip=      printdevice=        textwidth=0
  buflisted           helpheight=20       printoptions=       thesaurus=
  buftype=            helplang=en         prompt            notildeop
  cdpath=,,         nohidden              pumheight=0         timeout
  cedit=              history=0           quoteescape=\       timeoutlen=1000
  charconvert=      nohkmap             noreadonly            title
nocindent           nohkmapp              redrawtime=2000     titlelen=85
  cinoptions=       nohlsearch          norelativenumber      titlestring=
  clipboard=          icon                remap             nottimeout
  cmdheight=1         iconstring=         report=2            ttimeoutlen=-1
  cmdwinheight=7    noignorecase          restorescreen       ttybuiltin
  colorcolumn=      noimcmdline         norevins            nottyfast
  columns=80        noimdisable         norightleft           ttyscroll=999
  compatible          iminsert=2        noruler               undodir=.
  concealcursor=      imsearch=2          rulerformat=      noundofile
  conceallevel=0      includeexpr=        scroll=12           undolevels=1000
  completefunc=     noincsearch         noscrollbind          undoreload=10000
noconfirm             indentexpr=         scrolljump=1        updatecount=200
nocopyindent        noinfercase           scrolloff=0         updatetime=4000
  cryptmethod=zip   noinsertmode        nosecure              verbose=0
  cscopepathcomp=0    isprint=@,~-255     selectmode=         verbosefile=
  cscopeprg=cscope    joinspaces          shellcmdflag=/c     viminfo=
  cscopequickfix=     key=                shellquote=         virtualedit=
nocscopetag           keymap=           noshellslash        novisualbell
  cscopetagorder=0    keymodel=         noshelltemp           warn
nocscopeverbose       keywordprg=:help    shellxquote=      noweirdinvert
nocursorbind          langmap=          noshiftround          whichwrap=
nocursorcolumn        langmenu=           shiftwidth=8        wildchar=^E
nocursorline          laststatus=1        shortmess=          wildcharm=0
  debug=            nolazyredraw        noshortname           wildignore=
nodelcombine        nolinebreak           showbreak=        nowildmenu
  dictionary=         lines=25          noshowcmd             wildmode=full
nodiff                linespace=1       noshowfulltag         wildoptions=
  diffexpr=         nolisp              noshowmatch           winaltkeys=menu
  diffopt=filler    nolist              noshowmode            window=24
nodigraph             listchars=eol:$     showtabline=1       winheight=1
  display=          noloadplugins         sidescroll=0      nowinfixheight
  eadirection=both    magic               sidescrolloff=0   nowinfixwidth
noedcompatible        makeef=           nosmartcase           winminheight=1
  encoding=latin1     makeprg=make      nosmartindent         winminwidth=1
  endofline           matchtime=5       nosmarttab            winwidth=20
  equalalways         maxcombine=2        softtabstop=0       wrap
  equalprg=           maxfuncdepth=100  nospell               wrapmargin=0
noerrorbells          maxmapdepth=1000    spellfile=          wrapscan
noesckeys             maxmem=1803105      spelllang=en        write
  eventignore=        maxmemtot=1803105   spellsuggest=best nowriteany
noexpandtab           menuitems=25      nosplitbelow          writebackup
noexrc              nomodeline          nosplitright          writedelay=0
  backupdir=.,c:\tmp,c:\temp
  
backupskip=C:\Users\Alan.Budden\AppData\Local\Temp\*,C:\Users\ALAN~1.BUD\AppData\Local\Temp\*,C:\Users\ALAN~1.BUD\AppData\Local\Temp\*
  breakat= ^I!@*-+;:,./?
  casemap=internal,keepascii
  cinkeys=0{,0},0),:,0#,!^F,o,O,e
  cinwords=if,else,while,do,for,switch
  comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-
  commentstring=/*%s*/
  complete=.,w,b,u,t,i
  completeopt=menu,preview
  cpoptions=aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>
  define=^\s*#\s*define
  directory=.,c:\tmp,c:\temp
  errorfile=errors.err
  errorformat=%f(%l) : %t%*\D%n: %m,%*[^"]"%f"%*\D%l: %m,%f(%l) : %m,%*[^ ] %f 
%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,%f|%l| %m
  fileencodings=ucs-bom
  fileformats=dos,unix
  fillchars=vert:|,fold:-
  foldmarker={{{,}}}
  foldopen=block,hor,mark,percent,quickfix,search,tag,undo
  foldtext=foldtext()
  formatlistpat=^\s*\d\+[\]:.)}\t ]\s*
  grepformat=%f:%l:%m,%f:%l%m,%f  %l%m
  grepprg=findstr /n
  
guicursor=n-v-c:block-Cursor/lCursor,ve:ver35-Cursor,o:hor50-Cursor,i-ci:ver25-Cursor/lCursor,r-cr:hor20-Cursor/lCursor,sm:block-Cursor-blinkwait175-blinkoff150-blinkon175
  guioptions=egmrLtT
  helpfile=c:\vim\vim73\doc\help.txt
  
highlight=8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn
  include=^\s*#\s*include
  indentkeys=0{,0},:,0#,!^F,o,O,e
  isfname=@,48-57,/,\,.,-,_,+,,,#,$,%,{,},[,],:,@-@,!,~,=
  isident=@,48-57,_,128-167,224-235
  iskeyword=@,48-57,_,192-255
  
lispwords=defun,define,defmacro,set!,lambda,if,case,let,flet,let*,letrec,do,do*,define-syntax,let-syntax,letrec-syntax,destructuring-bind,defpackage,defparameter,defstruct,deftype,defvar,do-all-symbols,do-external-symbols,do-symbols,dolist,dotimes,ecase,etypecase,eval-when,labels,macrolet,multiple-value-bind,multiple-value-call,multiple-value-prog1,multiple-value-setq,prog1,progv,typecase,unless,unwind-protect,when,with-input-from-string,with-open-file,with-open-stream,with-output-to-string,with-package-iterator,define-condition,handler-bind,handler-case,restart-bind,restart-case,with-simple-restart,store-value,use-value,muffle-warning,abort,continue,with-slots,with-slots*,with-accessors,with-accessors*,defclass,defmethod,print-unreadable-object
  matchpairs=(:),{:},[:]
  maxmempattern=1000
  mkspellmem=460000,2000,500
  
mouseshape=i-r:beam,s:updown,sd:udsizing,vs:leftright,vd:lrsizing,m:no,ml:up-arrow,v:rightup-arrow
  nrformats=octal,hex
  paragraphs=IPLPPPQPP TPHPLIPpLpItpplpipbp
  printfont=Courier_New:h10
  printheader=%<%f%h%m%=Page %N
  rightleftcmd=search
  
runtimepath=~/vimfiles,c:\vim/vimfiles,c:\vim\vim73,c:\vim/vimfiles/after,~/vimfiles/after
  scrollopt=ver,jump
  sections=SHNHH HUnhsh
  selection=inclusive
  sessionoptions=blank,buffers,curdir,folds,help,options,tabpages,winsize
  shell=C:\WINDOWS\system32\cmd.exe
  shellpipe=>%s 2>&1
  shellredir=>%s 2>&1
  spellcapcheck=[.?!]\_[\])'"^I ]\+
  suffixes=.bak,~,.o,.h,.info,.swp,.obj
  titleold=Thanks for flying Vim
  ttytype=builtin_gui
  viewdir=c:\vim/vimfiles/view
  viewoptions=folds,options,cursor
--- Terminal codes ---
  t_AB=               t_da=               t_ms=y              t_us=^[|8h
  t_AF=               t_db=               t_nd=^L             t_vb=^[|f
  t_AL=^[|%dI         t_DL=^[|%dD         t_op=               t_ve=
  t_al=^[|i           t_dl=^[|d           t_RI=               t_vi=
  t_bc=               t_fs=               t_RV=               t_vs=
  t_cd=               t_IE=               t_Sb=               t_WP=
  t_ce=^[|$           t_IS=               t_Sf=               t_WS=
  t_cl=^[|C           t_ke=               t_se=^[|16H         t_SI=
  t_cm=^[|%d;%dM      t_ks=               t_so=^[|16h         t_EI=
  t_Co=               t_le=^H             t_sr=               t_xs=
  t_CS=               t_mb=               t_ts=               t_ZH=^[|4h
  t_cs=^[|%d;%dR      t_md=^[|2h          t_te=               t_ZR=^[|4H
  t_CV=^[|%d;%dV      t_me=^[|31H         t_ti=
  t_ut=y              t_mr=^[|1h          t_ue=^[|8H
--- Terminal keys ---
     <Mouse>     ›M
--- Auto-Commands ---
buffer_list  BufAdd
    *         call <SID>BMAdd()
buffer_list  BufDelete
    *         call <SID>BMRemove()
buffer_list  BufFilePost
    *         call <SID>BMAdd()
buffer_list  BufFilePre
    *         call <SID>BMRemove()
SpellPopupMenu  MenuPopup
    *         call <SID>SpellPopup()
--- Normal/Visual mode mappings ---
v  <C-X>         "*d
v  <C-Del>       "*d
v  <S-Del>       "*d
v  <C-Insert>    "*y
v  <S-Insert>    "-d"*P
n  <S-Insert>    "*P
--- Insert/Command-line mode mappings ---
!  <S-Insert>    <C-R><C-O>*
--- Abbreviations ---

No abbreviation found
--- Highlighting ---
SpecialKey     xxx term=bold ctermfg=1 guifg=Blue
NonText        xxx term=bold ctermfg=9 gui=bold guifg=Blue
Directory      xxx term=bold ctermfg=1 guifg=Blue
ErrorMsg       xxx term=standout ctermfg=15 ctermbg=4 guifg=White guibg=Red
IncSearch      xxx term=reverse cterm=reverse gui=reverse
Search         xxx term=reverse ctermfg=0 ctermbg=14 guibg=Yellow
MoreMsg        xxx term=bold ctermfg=2 gui=bold guifg=SeaGreen
ModeMsg        xxx term=bold cterm=bold gui=bold
LineNr         xxx term=underline ctermfg=6 guifg=Brown
Question       xxx term=standout ctermfg=2 gui=bold guifg=SeaGreen
StatusLine     xxx term=bold,reverse cterm=bold,reverse gui=bold,reverse
StatusLineNC   xxx term=reverse cterm=reverse gui=reverse
VertSplit      xxx term=reverse cterm=reverse gui=reverse
Title          xxx term=bold ctermfg=5 gui=bold guifg=Magenta
Visual         xxx term=reverse cterm=reverse guibg=LightGrey
VisualNOS      xxx term=bold,underline cterm=bold,underline gui=bold,underline
WarningMsg     xxx term=standout ctermfg=4 guifg=Red
WildMenu       xxx term=standout ctermfg=0 ctermbg=14 guifg=Black guibg=Yellow
Folded         xxx term=standout ctermfg=1 ctermbg=7 guifg=DarkBlue
                   guibg=LightGrey
FoldColumn     xxx term=standout ctermfg=1 ctermbg=7 guifg=DarkBlue guibg=Grey
DiffAdd        xxx term=bold ctermbg=9 guibg=LightBlue
DiffChange     xxx term=bold ctermbg=13 guibg=LightMagenta
DiffDelete     xxx term=bold ctermfg=9 ctermbg=11 gui=bold guifg=Blue
                   guibg=LightCyan
DiffText       xxx term=reverse cterm=bold ctermbg=12 gui=bold guibg=Red
SignColumn     xxx term=standout ctermfg=1 ctermbg=7 guifg=DarkBlue guibg=Grey
Conceal        xxx ctermfg=7 ctermbg=8 guifg=LightGrey guibg=DarkGrey
SpellBad       xxx term=reverse ctermbg=12 gui=undercurl guisp=Red
SpellCap       xxx term=reverse ctermbg=9 gui=undercurl guisp=Blue
SpellRare      xxx term=reverse ctermbg=13 gui=undercurl guisp=Magenta
SpellLocal     xxx term=underline ctermbg=11 gui=undercurl guisp=DarkCyan
Pmenu          xxx ctermbg=13 guibg=LightMagenta
PmenuSel       xxx ctermbg=7 guibg=Grey
PmenuSbar      xxx ctermbg=7 guibg=Grey
PmenuThumb     xxx cterm=reverse gui=reverse
TabLine        xxx term=underline cterm=underline ctermfg=0 ctermbg=7
                   gui=underline guibg=LightGrey
TabLineSel     xxx term=bold cterm=bold gui=bold
TabLineFill    xxx term=reverse cterm=reverse gui=reverse
CursorColumn   xxx term=reverse ctermbg=7 guibg=Grey90
CursorLine     xxx term=underline cterm=underline guibg=Grey90
ColorColumn    xxx term=reverse ctermbg=12 guibg=LightRed
Cursor         xxx guifg=bg guibg=fg
lCursor        xxx guifg=bg guibg=fg
MatchParen     xxx term=reverse ctermbg=11 guibg=Cyan
Normal         xxx font=Fixedsys:h9:cDEFAULT
--- Variables ---
did_install_default_menus #1
did_toolbar_tmenu     #1
bmenu_priority        #60
ctags_command          ctags -R .
paste#paste_cmd       {'v': '"-c<Esc>:call paste#Paste()<CR>', 'i': 
'x<BS><Esc>:call paste#Paste()<CR>gi', 'n': ':call paste#Paste()<CR>'}
more_save             #0
bmenu_max_pathlen     #35
b:changedtick         #3
v:version             #703
v:beval_winnr         #0
v:lnum                #0
v:scrollstart          c:\vim\vim73\bugreport.vim line 24
v:oldfiles            [
v:dying               #0
v:windowid            #4327746
v:lang                 C
v:count               #0
v:progname             gvim.exe
v:cmdbang             #0
v:foldlevel           #0
v:ctype                C
v:prevcount           #0
v:mouse_win           #0
v:count1              #1
v:foldstart           #0
v:foldend             #0
v:profiling           #0
v:beval_col           #0
v:errmsg               E328: Menu only exists in another mode
v:beval_lnum          #0
v:mouse_lnum          #0
v:beval_bufnr         #0
v:shell_error         #0
v:servername           GVIM
v:lc_time              English_United Kingdom.1252
v:searchforward       #1
v:mouse_col           #0
v:statusmsg            No abbreviation found

Raspunde prin e-mail lui