purcell / envrc

Emacs support for direnv which operates buffer-locally
379 stars 35 forks source link

Make direnv execution interruptible in a graceful way #54

Closed purcell closed 1 year ago

purcell commented 1 year ago

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.