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

Make direnv execution interruptible in a graceful way #54

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

purcell
Copy link
Owner

@purcell purcell commented Jan 5, 2023

Related to #6 and #53, some invocations of direnv can take a long time and block envrc.el. Managing all direnv invocations asynchronous would make everything less predictable and much more complex (either conceptually or in actual code terms), but nonetheless, sometimes we really don't want to wait.

With this commit, the user can hit C-g to halt invocation. This was possible before, but Emacs might nonetheless have tried the same thing again immediately. Now, envrc.el treats the interruption as a direnv failure and remembers it, so the user can proceed and reload the environment at their leisure.

Related to #6 and #53, some invocations of direnv can take a long time
and block envrc.el. Managing all direnv invocations asynchronous would
make everything less predictable and much more complex (either
conceptually or in actual code terms), but nonetheless, sometimes we
_really_ don't want to wait.

With this commit, the user can hit C-g to halt invocation. This was
possible before, but Emacs might nonetheless have tried the same thing
again immediately. Now, envrc.el treats the interruption as a direnv
failure and remembers it, so the user can proceed and reload the
environment at their leisure.
@purcell purcell mentioned this pull request Jan 5, 2023
@purcell purcell merged commit 1954e8c into master Jan 5, 2023
@purcell purcell deleted the interruptible branch January 5, 2023 07:19
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

1 participant