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

Fix error if god-execute-with-current-bindings deletes buffer #118

Merged
merged 1 commit into from
Jul 6, 2020
Merged

Fix error if god-execute-with-current-bindings deletes buffer #118

merged 1 commit into from
Jul 6, 2020

Conversation

Drainful
Copy link
Contributor

@Drainful Drainful commented Jul 6, 2020

Currently if a command executed via god-execute-with-current-bindings results in the deletion of the current buffer, an error message is spat out in the minibuffer. This commit updates the cleanup process of god-execute-with-current-bindings to check if the buffer exists and is alive before disabling god-local-mode.

Fixes #117

@darth10 darth10 added the bug label Jul 6, 2020
@darth10
Copy link
Collaborator

darth10 commented Jul 6, 2020

Thanks for reporting and fixing this bug @Drainful!
Would it be possible for you to add a test for this fix?

@Drainful
Copy link
Contributor Author

Drainful commented Jul 6, 2020

I'm not sure how to write a test since the error isn't caught by debug-on-error. It seems like the only artifact of the error is the annoying message in the minibuffer as it goes unhandled. I'm not sure why this is the case; it may have something to do with the error being raised during the function passed as the on-exit parameter of set-transient-map which ultimately ends up added to pre-command-hook.

@darth10
Copy link
Collaborator

darth10 commented Jul 6, 2020

This might be easier to test with ert than with feature-based testing through ecukes.
For now, I'll go ahead and merge it 👍

@darth10 darth10 merged commit 7122a1a into emacsorphanage:master Jul 6, 2020
@darth10
Copy link
Collaborator

darth10 commented Jul 6, 2020

Thanks for the contribution @Drainful! 💯

@Drainful
Copy link
Contributor Author

Drainful commented Jul 6, 2020

NP! thanks for your work on this awesome package. I feel like god-mode has filled a massive hole in my emacs config.

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

Successfully merging this pull request may close these issues.

Error message when god-execute-with-current-bindings deletes the current buffer
2 participants