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:29:52 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Thunderbird/65.0

On 03.02.2019 03:05, Andrey Butirsky wrote:
> Hello Shigio, here is some notes: 

Sorry, wrapping problem. Here again:

>  "
>  " 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]