开发者

Emacs Putting "inappropriate ioctl" error in PATH variable

开发者 https://www.devze.com 2023-03-25 07:00 出处:网络
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'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?


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!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号