Menu

Error while '\vf' to create a new viki

Viki
bybor
2009-12-31
2013-04-17
  • bybor

    bybor - 2009-12-31

    There is an error in 3.13 version. Same message as

    but it has nothing to do with g:hideViki
    Version 3.11 doesn't have this bug
    gVim 7.2/Windows 7 x64

      : https://sourceforge.net/projects/deplate/forums/forum/700962/topic/3425027

     
  • Tom Link

    Tom Link - 2009-12-31

    May I kindly ask you to describe the error? What steps would I have to follow in order to reproduce the problem?

     
  • bybor

    bybor - 2009-12-31

    excuse me not giving enough details

    in viki file i enter this text
    []

    Trying to Ctrl+Enter or '\vf' brings this message

    Error detected while processing function viki#MaybeFollowLink..<SNR>65_FollowLink..<SNR>65_OpenLink..VikiOpenSpecialProtocol..viki#ExecExternal:
    Line 2:
    E10: \ should be followed by /, ? or &
    Error detected while processing function viki#MaybeFollowLink..<SNR>65_FollowLink:
    Line 29:
    E171: Missing :endif
    Error detected while processing function viki#MaybeFollowLink:
    line 8:
    E171: Missing :endif

    Buffer isn't dirty, so it has nothing to do with g:vikiHide

    Sorry for not putting all info at first post.
    Don't known how to save :messages output, had to type it

     
  • Tom Link

    Tom Link - 2009-12-31

    Could you please post the output of:

          echo g:vikiOpenUrlWith_ANY
          function VikiOpenSpecialProtocol

    You don't have a variable g:vikiOpenUrlWith_http defined?

    It could also be interesting to see the output after redefining VikiOpenSpecialProtocol() and then typing \vf again:

        function! VikiOpenSpecialProtocol(url)
            echom a:url
        endf

    I assume though that the problem is the definition of g:vikiOpenUrlWith_ANY Which OS/desktop environment do you use?

     
  • Tom Link

    Tom Link - 2009-12-31

    You can redirect the output of messages to a variable with :redir or save the output to a file by temporarily setting 'verbosefile' (in the latter case I'd suggest to run the whole thing with verbose=12 and send me the whole thing via mail).

     
  • bybor

    bybor - 2009-12-31

    1. exec 'silent !rundll32 url.dll,FileProtocolHandler '. shellescape('%{URL}')
    2.
    `   function VikiOpenSpecialProtocol(url)`
    `1          " TLogVAR a:url`
    `2          " TLogVAR a:url`
    `3          let proto = tolower(matchstr(a:url, '\c^\{-}\ze:'))`
    `4          let prot  = 'g:vikiOpenUrlWith_'. proto`
    `5          let protp = exists(prot)`
    `6          if !protp`
    `7              let prot  = 'g:vikiOpenUrlWith_ANY'`
    `8              let protp = exists(prot)`
    `9          endif`
    `10         if protp`
    `11             exec 'let openURL = '. prot`
    `12             " let url = shellescape(a:url)`
    `13             let url = a:url`
    `14             " TLogVAR url, a:url`
    `15             let openURL = viki#SubstituteArgs(openURL, 'URL', url)`
    `16             " TLogVAR openURL`
    `17             call viki#ExecExternal(openURL)`
    `18         else`
    `19             throw 'Viki: Please define g:vikiOpenUrlWith_'. proto .' or ``g:vikiOpenUrlWith_ANY!'`
    `20         endif`
    `   endfunction`
    ``
    After redefinition of function it just outputs url

    I'm on Windows 7, x64, gVim 7.2
    And version 3.11 of Viki works fine with this. Not sure if my setup causes problems

     
  • bybor

    bybor - 2009-12-31

    Didn't notice you last post - if you need all that output using verbose file please let me know

     
  • Tom Link

    Tom Link - 2009-12-31

    Search for the function viki#ExecExternal(cmd) in autoload/viki.vim.

    Change the line

    exec escape(a:cmd, '!')

    to

    exec a:cmd

    This change was introduced in 3.13 and causes this problem.

     
  • bybor

    bybor - 2009-12-31

    Thanks for your help. Happy New Year.
    Wish you best luck!

     

Log in to post a comment.