2

I'm on OS X 10.6.8. I've replicated the following errors with Emacs for OS X (http://emacsformacosx.com/) and with Aquamacs (current versions of both).

I discovered the problem by attempting to enter version control mode (CTRL-X v v) while editing a file in a Subversion Repo. I get the following error:

"Searching for program: No such file or directory, svn"

In OS X, svn is in /usr/bin.

C-h v exec-path shows this:

exec-path is a variable defined in `C source code'.
Its value is
("mesg" " ttyname" " Inappropriate ioctl for device/usr/bin" "/bin" "/usr/sbin" "/sbin" "/usr/local/bin" "/usr/X11/bin" "/usr/local/git/bin" "/Users/schof/py/scripts" "/usr/texbin" "/Users/schof/py/scripts")

Note how "Inappropriate ioctl for device" is mashed up with "/usr/bin." I'm pretty sure this is why Emacs isn't finding svn in /usr/bin.

Any ideas for how I can fix this? Or further troubleshooting suggestions?

Schof
  • 6,329
  • 5
  • 28
  • 38

1 Answers1

1

Here are a number of things you can do:

  1. Google for possible causes of the "Inappropriate ioctl for device" message that is being written. This will give you some clues about the types of things that could be causing this message.
  2. Run emacs without init files and then check whether this message is still present in your exec-path variable. If it is, then it's probably due to something external to Emacs (e.g. - your .bashrc or other shell init file). Looking at the C source in callproc.c, it looks like the most likely culprits would be the environmental variables "EMACSPATH" or "PATH" so you should check those environmental variables and also whatever code is setting those variables in any shell scripts you run. However, environmental variables on Mac OS X can also come from "~/.MacOSX/environment.plist", so you should check what is being set there to see whether that is the culprit.
  3. If you didn't get the "Inappropriate ioctl for device" message when running emacs without init files, then start executing chunks of your Emacs init files (examining the exec-path variable each time to see whether the code that was run caused the error message to be added).

Good luck!

Community
  • 1
  • 1
zev
  • 3,480
  • 18
  • 13
  • Did a binary search on my .emacs file and found that http://stackoverflow.com/questions/5543989/pylint-not-working-with-emacs-gui-on-os-x-works-from-command-line/5558223#5558223 was the offending .emacs code. However, I was able to replicate the problem by executing "echo $PATH" in an emacs shell. Worked perfectly from the terminal, though. The eventual culpret was a "mesg n" line in my .bashrc, which was causing the error message when run from a non-interactive terminal. Removing it fixed the issue. – Schof Aug 04 '11 at 17:39