Comments (3)
Ah, okay, I'll fix this.
Now, I wanted to ask your opinion. I'm considering adding this defvar to allow handling some script names in a special way.
(defvar buffer-env--commands
'((t . ">&2 . \"$0\" && env -0")
(".env" . "set -a && >&2 . \"$0\" && env -0")
("guix.scm" . ">&2 guix shell -D -f \"$0\" -- env -0"))
"Alist of commands used to produce environment variables.
For each entry, the car is possible value of
`buffer-env-script-name' and the cdr is a shell command. When a
script is found, the corresponding command is executed in a
shell, in the directory of the script, with its absolute file
name as argument. The command should print a null-separated list
of environment variables, and nothing else, to the standard
output.
The entry t in this alist is a fallback value.")
So in your use-case, you could add (".envrc" . "direnv exec . env -0")
to this list. I guess this would help in your use-case, right?
On the other hand, I should ask: why not just put source env/bin/activate
in a .envrc
file?
from buffer-env.
I like the idea of the defvar
, although I'd probably make it a defcustom
since the user can change its value.
On the other hand, I should ask: why not just put
source env/bin/activate
in a.envrc
file?
No specific reason. I didn't want to rely on direnv
on this project because I like the fact that buffer-env
does not force me to. :)
from buffer-env.
Thank you, I confirm it's working as expected now.
from buffer-env.
Related Issues (12)
- Alternative to Customize? HOT 6
- `format-prompt` not defined in Emacs 27 HOT 4
- Support pyproject.toml HOT 1
- `cl-letf` warning HOT 9
- Temporarily disable hack-local-variables-hook? And misc org-babel issues. HOT 4
- Support specifying a command directly HOT 4
- buffer-env-active mention in README does not exist
- Fails to activate virtualenv interactively HOT 13
- How to inherit environment from manifest.scm to external applications HOT 2
- Saving buffer-env-safe-files: wrong-type-argument listp t HOT 15
- Adding buffer-env-update to hack-local-variables-hook does not affect buffers without files HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buffer-env.