Every time I open a new Terminal window or tab, it shows this error before the shell prompt:
/etc/zshrc_Apple_Terminal:14: INSIDE_EMACS: parameter not set
(I don't use emacs, and I've noticed no other ill effects.)
As that indicates, my default shell is zsh
. The error also appears when starting a new zsh
instance from within any existing shell.
Line 14 of /etc/zshrc_Apple_Terminal
is:
if [ -z "$INSIDE_EMACS" ]; then
So that file clearly expects $INSIDE_EMACS
to be set, and gives the error when it's not. But I've not been able to find out what should be setting it (that's clearly not working on my machine). I have various user-level shell startup files, but none of those seem to be the cause, as that message appears before any of them have run.
There's an obvious workaround: edit that file (as root) and e.g. replace $INSIDE_EMACS
with ${INSIDE_EMACS-}
(which silently expands to empty string if the variable's not set). That works fine — but every time I upgrade macOS, that file gets replaced and the error is back! (This has happened with every upgrade since around macOS 12 Monterey; I'm now on the current macOS 15.5.)
I've not found this error online (other than my own mention in [this answer](https://apple.stackexchange.com/a/439072/291214)) , so I'm guessing it's not common, and probably triggered by some quirk of my own set-up. But I haven't found any possible cause.
What can I do to make this error go away for good? What _should_ be setting $INSIDE_EMACS
?
Asked by gidds
(1140 rep)
May 16, 2025, 11:51 AM
Last activity: May 17, 2025, 02:13 AM
Last activity: May 17, 2025, 02:13 AM