bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New custom variable Gtags_Emacs_Like_Mode for gtags.vim


From: Andrey Butirsky
Subject: Re: New custom variable Gtags_Emacs_Like_Mode for gtags.vim
Date: Sun, 3 Feb 2019 03:05:29 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Thunderbird/65.0

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]