On Fri, Dec 19, 2008 at 11:32 PM, Chong Yidong wrote: >> I grepped through a large list of files and intermittently >> got an error "Can't exec program" instead of matches. > > Please provide an exact recipe for reproducing this bug, starting with > `emacs -Q'. Thanks. > The problem is intermittent, and I was unable to reproduce it at all this morning. But I'll provide you with something as similar as I can to the environment I usually see the problem in without providing you with my company's source code. I've attached a .el file named "filenames.el". If I run emacs like this: emacs -l filenames.el Then do: esc-x my-grep and enter some string to grep for, it sometimes fails with "Can't exec program". From what I can determine, execvp is failing in callproc.c, but I don' know why this would be intermittent: execvp (new_argv[0], new_argv); emacs_write (1, "Can't exec program: ", 20); I'm not sure if the problem is reproducible with the attached file, but it is basically the same thing as what I'm doing when I see the problem. My project makefile generates a list of all of the source files in the application and when I want to find a string in the source files, I use the my-grep function to search for it (I find this more convenient than tags search). Thanks, David