Closed bbatsov closed 8 years ago
What is $SHELL
on that machine? I don't expect to be able to support any platform without the POSIX command line programs, which is why the README suggests initialization code like:
(when (memq window-system '(mac ns))
(exec-path-from-shell-initialize))
(getenv "SHELL")
"C:/Users/bozhi/emacs-24.5/libexec/emacs/24.5/i686-pc-mingw32/cmdproxy.exe"
Yeah, I get what you're saying, but it seems to me something that can be done automatically - Windows users are going to have this by default, so there can be a check for it. Btw, I thought the package was also useful on Linux, but I might be mistaken...
Btw, isn't it more sensible to check if system-type
is darwin
?
Yeah, I get what you're saying, but it seems to me something that can be done automatically - Windows users are going to have this by default, so there can be a check for it. Btw, I thought the package was also useful on Linux, but I might be mistaken...
The package is useful in some Linux configs, most OS X configs, and some Windows systems, e.g. those with ported UNIX utilities. Only the user can determine whether exec-path-from-shell
is desirable on his/her system: there's no automatic rule to determine this, hence the suggested setup code.
I'd rather not start trying to handle every possible situation, or programming defensively for all the different ways things could go wrong when the package is used on unintended systems: it's enough for me that there's an error. That said, I might consider adding a check for explicitly unsupported shells, so that the error message could be more direct.
Btw, isn't it more sensible to check if system-type is darwin?
No, because if you start Emacs in a terminal on a Mac, you won't want to use exec-path-from-shell
.
Fair enough, I'll close this.
Cheers. Noted this in the README in c2ca275. Thanks for bringing this up!
I'm not sure how to best handle this, but when on Windows you'd get something like:
I can disable the package in my config, or can behave differently in such cases (which seems like a better idea in general).