Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get Dispatch/Quickfix to work #12

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

Cannot get Dispatch/Quickfix to work #12

nistude opened this issue Apr 3, 2013 · 18 comments

Comments

@nistude
Copy link

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
Copy link
Owner

tpope commented Apr 3, 2013

What version of tmux?

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

@tpope
Copy link
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
Copy link
Author

nistude commented Apr 3, 2013

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

@nistude
Copy link
Author

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
Copy link
Owner

tpope commented Apr 3, 2013

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

@tpope
Copy link
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
Copy link
Owner

tpope commented Apr 3, 2013

Actually sessionname:windowid.paneid.

@nistude
Copy link
Author

nistude commented Apr 4, 2013

the file contains "1:1.1"

@tpope
Copy link
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
Copy link
Author

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 closed this as completed in 5c0b55e Apr 4, 2013
@tpope
Copy link
Owner

tpope commented Apr 4, 2013

You're right!

@nistude
Copy link
Author

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
Copy link
Owner

tpope commented Apr 5, 2013

Try :Copen!.

@nistude
Copy link
Author

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
Copy link
Author

nistude commented Apr 5, 2013

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

@joemoore
Copy link

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
Copy link
Author

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
Copy link

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//issues/12#issuecomment-17286549
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants