Cannot get Dispatch/Quickfix to work #12

Closed
nistude opened this Issue Apr 3, 2013 · 18 comments

Projects

None yet

3 participants

@nistude
nistude commented Apr 3, 2013

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
tpope commented Apr 3, 2013

What version of tmux?

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

@tpope
Owner
tpope commented Apr 3, 2013

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
nistude commented Apr 3, 2013

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

@nistude
nistude commented Apr 3, 2013

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
tpope commented Apr 3, 2013

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

@tpope
Owner
tpope commented Apr 3, 2013

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
tpope commented Apr 3, 2013

Actually sessionname:windowid.paneid.

@nistude
nistude commented Apr 4, 2013

the file contains "1:1.1"

@tpope
Owner
tpope commented Apr 4, 2013

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
nistude commented Apr 4, 2013

I use bash. As far as I can tell, the sleep in dispatch#prepare_make is
overridden, no?

@tpope tpope added a commit that closed this issue Apr 4, 2013
@tpope Fix missing sleep for fast running tasks
Closes #12.
5c0b55e
@tpope tpope closed this in 5c0b55e Apr 4, 2013
@tpope
Owner
tpope commented Apr 4, 2013

You're right!

@nistude
nistude commented Apr 5, 2013

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
tpope commented Apr 5, 2013

Try :Copen!.

@nistude
nistude commented Apr 5, 2013

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
nistude commented Apr 5, 2013

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

@joemoore
joemoore commented May 1, 2013

@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
nistude commented May 1, 2013

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

@joemoore
joemoore commented May 1, 2013

I just needed to update to master. Thanks!

On Wed, May 1, 2013 at 11:19 AM, Nikolay Sturm notifications@github.comwrote:

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


Reply to this email directly or view it on GitHubhttps://github.com/tpope/vim-dispatch/issues/12#issuecomment-17286549
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment