Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Cannot get Dispatch/Quickfix to work #12

Closed
nistude opened this Issue · 18 comments

3 participants

@nistude

Running 'Dispatch rspec %' does not open a new pane but seems to run rspec in vim. I see this message in the output: can't find pane: 1

Afterwards, the output of rspec is loaded into the quickfix window, however, I cannot get ':cc' to work. Calling `:Copen' switches to the quickfix window without changing anything. Calling ':cc' doesn't do anything.

I am kind of lost here, any help appreciated. I use tmux 1.6, vim 7.3 on ubuntu 12.04.

@tpope
Owner

What version of tmux?

Last problem sounds like you need a newer version of vim-ruby.

@tpope
Owner

Oh I missed the version at the bottom. I did a lot of testing on tmux 1.6 on Debian so I'm a bit surprised.

@nistude

Updating vim-ruby indeed fixes the quickfix issue! Thx!

@nistude

Is it possible that my shellescape() is somehow broken? If I echom arg and echom shellescape(arg) in dispatch#shellescape, I see the following:

trap 'rm -f /tmp/vgET8O6/1.pid; touch /tmp/vgET8O6/1.complete; ' EXIT INT TERM; cd "/home/sturm/data/src/intellington/importer"; rspec %                                           
'trap '\''rm -f /tmp/vgET8O6/1.pid; touch /tmp/vgET8O6/1.complete; '\'' EXIT INT TERM; cd "/home/sturm/data/src/intellington/importer"; rspec %'

This looks as if a single quote character is escaped to four characters: '\''

@tpope
Owner

That's standard Bourne shell escaping. It's closing and reopening the quotes.

@tpope
Owner

Since you seem comfortable rummaging around in Vimscript, you might take a look at the contents of the underlying file in s:make_pane. It should look like sessionname:windowid.

@tpope
Owner

Actually sessionname:windowid.paneid.

@nistude

the file contains "1:1.1"

@tpope
Owner

Oh, I wonder if it's just failing super quick. There's a sleep 0.1 in there to compensate for the potential race condition, but maybe that's enough? Or maybe it's failing to even make it that far.

What shell are you using?

@nistude
@tpope tpope closed this in 5c0b55e
@tpope
Owner

You're right!

@nistude

With the latest master, the pane properly seems to open, only it closes right afterwards. No tests are run, no quickfix window opens, no information what just happened.

@tpope
Owner

Try :Copen!.

@nistude

Now we are getting somewhere: sh: 1: rspec: not found
I guess that's the rvm issue someone else reported. Thanks for you help!

@nistude

Forcing an interactive shell with :Dispatch bash -i -c 'rspec %' makes the command run but breaks output parsing...

@nistude nistude referenced this issue from a commit
Nikolay Sturm add support for RVM
fixes #12
dc6c7a1
@joemoore

@nistude did you ever fix the quickfix-instantly-closes issue? The quickfix pane closes even with rspec failures for me, too, though I can open it with :Copen!

@nistude

@joemoore the code from around the time this issue was closed works perfectly for me. haven't updated to current, though.

@joemoore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.