The 9.0.1 Mac OS X package has code to chdir to the user's home directory upon launch. While this is appropriate when launching it as an application, it is unexpected when running the mit-scheme binary from the command line.
With encouragement from Taylor Campbell, I've added a command line option --macosx-application, and made it so the program doesn't change to the home directory unless the option is supplied. I've also caused macosx-starter to supply this option when the program is launched as an application. The patch attached. I'm not sure this is the most elegant solution, but I've looked a little for OS X mechanisms to determine whether a binary is being run as part of an application or on the command line, and haven't found any. This option is at least similar in spirit to the existing --emacs option. Now the mit-scheme binary can be launched from the command line without it changing the current directory. However, I've found that just symlinking the binary into a directory in my $PATH doesn't suffice, because then mit-scheme can't find its libraries. However, if I put the actual directory where the binary resides in $PATH, or if I invoke it with a full pathname, it works. Would it be possible for the OS X build to include a shell script to launch it? Also, I found that configure didn't detect my X11 headers and/or libraries. I had to supply --x-libraries=/usr/X11/lib --x-includes=/usr/X11/include. Perhaps someone could look into that. Finally, it might be nice if it were possible to specify at launch time whether to open Edwin in an X window or the current terminal.
mit-scheme-macosx-application.diff
Description: Binary data
_______________________________________________ MIT-Scheme-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/mit-scheme-devel
