Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
The minor mode also sets advice on make-process and friends, so if the process-environment variable and/or exec-path variable has been set, all processes launched from within an Emacs buffer for a file contained within the directory can inherit this environment. This makes it behave somewhat similar to direnv but is implemented purely in Emacs Lisp.
Announcing dir-local-env.el, a method of setting directory-local variables from within init.el rather than creating a file called .dir-locals.el in each project directory.
Indeed it is, I am caching the process-environment and exec-path variables on a per-directory basis, as these values are computed by the Nix functional package manager for each project I work on.
If you are interested in a “direnv but in Elisp”, you may want to check out this package: https://github.com/astoff/buffer-env.
I also wanted to avoid having to add files into my projects repositories, however I also didn't especially want to have to configure my projects in my init.el file either, so I wrote sidecar-locals which allows something similar to dir-locals that can be located above the projects in a sub-directory.