On 29.01.2019 04:28, Shigio YAMAGUCHI wrote:
> Hello all,
> I have added new custom variable 'Gtags_Emacs_Like_Mode' to gtags.vim.
> The concept of this mode is the idea of Andrey Butirsky. Thank you Andrey!
>
> Gtags_Emacs_Like_Mode   use the tag files of the project to which the
> current file
>                         belongs instead of the current project. Every
> path name is
>                         always treated as an absolute path name.


Hello Shigio, here is some notes:

>  "
>  " Auto update of tag files using incremental update facility.
>  "
>  function! s:GtagsAutoUpdate()
> -    let l:result = system(s:global_command . " -u --single-update=\""
> . expand("%") . "\"")
> +    let l:result = system(s:GlobalCommand() . " -u
> --single-update=\"" . expand("%") . "\"")
>  endfunction
>  
>  "
> @@ -537,7 +566,7 @@
>          endif
>          return glob(l:pattern)
>      else
> -        return system(s:global_command . ' ' . '-c' . s:option . ' '
> . a:lead)
> +        return system(s:GlobalCommand() . ' ' . '-c' . s:option . ' '
> . a:lead)
>      endif
>  endfunction

Here we also need '--path-style=absolute' arguments.

Maybe just set the option here to eliminate such errors?:

> +"
> +" Get global command string.
> +"
> +function! s:GlobalCommand(...)
> ...
> +    if g:Gtags_Emacs_Like_Mode == 1 && expand('%') != ''
> +        let l:result = 'cd ' . expand('%:p:h:S') . ' && ' .
> s:global_command . l:option
The '--path-style=absolute' option is a direct sequence of 'cd' command,
so it would be in-place here.


_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global

Reply via email to