-
Notifications
You must be signed in to change notification settings - Fork 38
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
on non-zero exit display stderr in message area #34
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for looking into this.
what about popping up the *direnv*
(with space in front) buffer instead? it would show everything.
also it seems the temporary file is not deleted in all cases.
not using a temp file but showing the buffer instead would avoid all that i think?
yeah, but we only really want
good catch, will move that to the very end of that block. |
837bafe
to
537455f
Compare
This is ready from my side. |
is that really possible in practice? having an error and json output? |
Well yeah, it happens when you run |
ok, fair enough. this pr does a few things:
doing 1 is fine, it doesn't ‘cripple’ emacs as a whole just by opening a file in directory tree containing a not-yet-allowed doing 2 seems not needed, and seems like a regression. the doing 3 is fine if there's only info added. but the main ‘there is a problem’ message has disappeared. what do you think? sorry for being nitpicky; i'd rather keep things as simple and explicit as possible. this is one of many projects for me, and this helps maintenance burden (code + support). so let me say it out loud: thanks for improving |
I agree, we should also add
The problem here was that it opened the direnv buffer, meaning the user has to make an effort to close that buffer again each time they switch to a buffer that has not yet run Pasting stderr to the message region means two things:
I write “direnv exited |
Instead of throwing an error (which disables direnv-mode for all buffers), display the stderr of direnv in the status line. If an envrc was not yet allowed, this will provide a better user experience, prompting the user with a message that is easy to ignore.
537455f
to
da0ba0e
Compare
I appended the stderr to To be honest it took me a while to understand how to open |
i used a hidden buffer because it seems the right approach for ‘unintrusive’ buffers, but in practice it's just causing confusion, since people actually do care about that buffer quite often. i'd happily accept a pull request that removes the space and updates the readme 😉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, looks good!
This is a proposal to fix #32
Instead of throwing an error (which disables direnv-mode for all
buffers), display the stderr of direnv in the status line.
If an envrc was not yet allowed, this will provide a better user
experience, prompting the user with a message that is easy to ignore.
cc @jvshahid