vim-unite-issue icon indicating copy to clipboard operation
vim-unite-issue copied to clipboard

Unknown function: s:fetch_issue

Open bbakersmith opened this issue 10 years ago • 9 comments

When I try to view an issue (by hitting enter while the cursor is on it) I get the following error:

[unite.vim] function unite#action#do..268, line 5
[unite.vim] Vim(let):E117: Unknown function: s:fetch_issue
[unite.vim] Error occurred while executing "view" action!

I'm happy to dig into this myself, but do you have any insight into what might be happening or where to start?

Thanks!

bbakersmith avatar Nov 09 '15 14:11 bbakersmith

It seems that, as suggested by the above error, the s:fetch_issue function is not available when called by the view action / function (line 67 of /autoload/unite/kinds/issue.vim).

The s:fetch_issue function is defined on line 154 of /autoload/issue/provider/jira.vim, and referenced on line 143 of the same file.

Changing s:fetch_issue to a global variable, just for kicks, still doesn't work, so I assume that jira.vim is not currently loaded / available at the time the view action is being called? Thoughts?

bbakersmith avatar Nov 09 '15 19:11 bbakersmith

Hi there. What command did you use to open unite-issue? I wonder what Unite version you're using.

rafi avatar Nov 13 '15 07:11 rafi

Using the very newest Unite. The command is :Unite issue:jira

bbakersmith avatar Nov 13 '15 19:11 bbakersmith

Before selecting an issue, could you select the echo action and paste output here? press a to access the <Plug>(unite_choose_action) command)

rafi avatar Nov 14 '15 00:11 rafi

Here is the output of echo. FWIW, the browse command does open the issue in the browser, but the view and comment commands do not work.

[{'word': 'AB-1234   v      :Blocked   Story     | Do the things [admin, foo, bar]', 'unite__abbr
': 'AB-1234   v      :Blocked   Story     | Do the things [admin, foo, bar]', 'is_dummy': 0, 'sou
rce': 'issue', 'unite__is_marked': 0, 'is_multiline': 0, 'source__issue_info': {'fetch_issue': function('<SNR>93_
fetch_issue'), 'url': 'https://opinionlab.atlassian.net/browse/AB-1234', 'key': 'AB-1234', 'repo': 'jira'}, 'kind
': 'issue', 'is_matched': 1}]

bbakersmith avatar Nov 14 '15 20:11 bbakersmith

I can't reproduce. Could you try changing line 143 to:

            \   'fetch_issue': function('<SID>fetch_issue'),

I wonder if that will have an effect on it.

rafi avatar Nov 15 '15 18:11 rafi

Same error but "Unknown function: <SID>fetch_issue". This happens on both mac and linux. At some point I will try a fresh install with no other plugins.

bbakersmith avatar Nov 16 '15 16:11 bbakersmith

I wanted to refactor the way fetch_issue is handled currently, passed through in each candidate. I hope I'll find some time this week. I'll let you know.

rafi avatar Nov 16 '15 16:11 rafi

There were a few improvements and fixes done since you post this issue, could you test again with master branch?

rafi avatar Feb 29 '16 14:02 rafi