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

Add rspec-autosave-buffer variable #129

Merged
merged 1 commit into from Oct 3, 2015
Merged

Add rspec-autosave-buffer variable #129

merged 1 commit into from Oct 3, 2015

Conversation

asok
Copy link
Contributor

@asok asok commented Oct 3, 2015

It is safe to assume that if rspec-verify and rspec-verify-single
are called from a dirty buffer that the user will want it to be saved first.

@dgutov
Copy link
Collaborator

dgutov commented Oct 3, 2015

This seems inadequate:

  • What if the edited buffer is the other one (the code, or the test) than we're currently in?
  • What about the other commands, like -matching and -continue?

Either way, I think this should be disabled by default: save-some-buffers, called by compile, functions just fine, and occasionally it helps me find a character typed by mistake.

@asok
Copy link
Contributor Author

asok commented Oct 3, 2015

What if the edited buffer is the other one (the code, or the test) than we're currently in?

The call to (rspec-spec-or-target) takes care of that. That is it will only autosave in case the current buffer is the code or the test.

What about the other commands, like -matching and -continue?

Did not know about those commands. I've forced pushed the fix for it.

@dgutov
Copy link
Collaborator

dgutov commented Oct 3, 2015

That is it will only autosave in case the current buffer is the code or the test.

But it'll only save the current one, right?

@asok
Copy link
Contributor Author

asok commented Oct 3, 2015

Yes it save-buffer saves the current buffer if modified.

@dgutov
Copy link
Collaborator

dgutov commented Oct 3, 2015

Did not know about those commands. I've forced pushed the fix for it.

Maybe you should also update the new variable's docstring somehow.

@asok
Copy link
Contributor Author

asok commented Oct 3, 2015

Ah yes thanks for pointing that out.

It is safe to assume that if `rspec-verify`, `rspec-verify-single`,
`rspec-verify-matching` and `rspec-verify-continue` are called
from a dirty buffer that the user will want it to be saved first.
@dgutov
Copy link
Collaborator

dgutov commented Oct 3, 2015

All right, thanks for the corrections.

dgutov added a commit that referenced this pull request Oct 3, 2015
Add `rspec-autosave-buffer` variable
@dgutov dgutov merged commit 7b0a900 into pezra:master Oct 3, 2015
@asok asok deleted the autosave branch October 3, 2015 10:24
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 this pull request may close these issues.

None yet

2 participants