Closed incandescentman closed 4 years ago
Thanks. I’ve answered on the stackexchange post, but if there’s more to discuss, this issue would be the easier place to do it.
It looks like you've run the exec-path-from-shell from a Tramp buffer, so when it runs the shell, it attempts to do its magic on the remote server and then set the environment variables in your local emacs instance.
I don't think I've done that? At least not on purpose. I'm just trying to launch Emacs. Maybe I have an error in my .bashrc? Shall I share it with you?
Hmm. First thing I'd try would be to add a (message "...")
call before and after calling exec-path-from-shell-initialize
in your startup files. If there's an error, or it doesn't reach the second message
call, then you know exec-path-from-shell
is failing.
If there's no error, but the startup subsequently hangs, then the problem must be due to exec-path-from-shell
's effect on the Emacs instance, which is (by default) to set the $PATH
and $MANPATH
environment variables. It's not inconceivable that your $PATH
might then be set wrong due to your bash startup files, causing tramp
to not find ssh
or other programs it needs. So, in short, maybe try:
(message "Calling exec-path-from-shell-initialize")
(exec-path-from-shell-initialize)
(message "PATH is now: %s" (getenv "PATH"))
and see whether you get a reasonable-looking $PATH
from the final statement there. If not, we can look at your .bashrc
. :-)
P.S. Nice to meet you - I recall enjoying your writing previously.
I added two new lines to my
.bashrc
[so that Bash can find my Go programs][1]:But as a result, when I launch Emacs, Emacs hangs for several minutes and I get this error:
Disabling
exec-path-from-shell
resolved the issue: http://emacs.stackexchange.com/questions/24159/tramp-waiting-for-prompts-from-remote-shell?noredirect=1#comment37054_24159How do I resolve this error without disabling
exec-path-from-shell
?