pezra / rspec-mode

An RSpec minor mode for Emacs
257 stars 112 forks source link

Add `rspec-autosave-buffer` variable #129

Closed asok closed 9 years ago

asok commented 9 years ago

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 commented 9 years ago

This seems inadequate:

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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

dgutov commented 9 years ago

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 commented 9 years ago

Ah yes thanks for pointing that out.

dgutov commented 9 years ago

All right, thanks for the corrections.