Hey, this isn't a regular blog post, just a contribution to the Emacs community. Hopefully this will get picked up by Google and help out a fellow Emacs user.
I started getting this error whenever I ran M-x grep-find:Wrong type argument: stringp, 70
Here's the important part of the stack trace:
Debugger entered--Lisp error: (wrong-type-argument stringp 70)Eventually I figured out to look at the process-environment variable, which holds all the variables set by setenv.
string-match("\\`GREP_OPTIONS=" 70)
setenv("GREP_OPTIONS" " --color=always")
process-environment is a variable defined in `C source code'.So there it is. string-match is choking on the non-string value 70 in the process environment. And where was that coming from? I searched my .emacs file only to find the following line, left over from some failed experiment:
Its value is
(70 79 79 61 98 97 114 "TERM=dumb" "TERMCAP="...
(setq compilation-environment "FOO=bar")This would execute without an error but leave the process-environment in a bad state.
Moral of the Story
If you're having a problem with setenv or getenv, or any compilation process, check process-environment and make sure it's properly formed.
No comments:
Post a Comment