I remember a friend asked me some time ago why I couldn't open the matlab program in emacs? It can be opened in terminal but not in emacs.
Today, I finally encountered a similar problem. After installing racket 6. 0. After installing racket, the execution path of the racket program is/usr/local/racket/bin.
Then I added this PATH to the PATH, which can be opened in the terminal environment.
Next, install Geiser. It is a plug-in connecting to racket in emacs. It is easy to install. I put the compiled file ~ /. Emacs. d/site-lisp/geiser
Then add the following lines in init. el. For my preparation files, see https://github.com/aborn/ulitcs
(load "~/.emacs.d/site-lisp/geiser/elisp/geiser-load")
Then M-x run-geiser was used to find that the racket program could not be found. At this time, I was thinking that the PATH in the bash environment should not be used in emacs,
Otherwise, why can't I find it?
The two links link1 and link2 are found online, and the execution path of emacs is determined by the exec-path variable.
Open M-x ielm to view the exec-path and find the following content:
exec-path("/usr/local/sbin" "/usr/local/bin" "/usr/sbin" "/usr/bin" "/sbin" "/bin" "/usr/games" "/usr/local/games" "/usr/lib/emacs/24.3/i686-linux-gnu")
No/usr/local/racket/bin found
In this case, you only need to add the following lines to the preparation file init. el and add the path/usr/local/racket/bin to exec-path.
(add-to-list 'exec-path "/usr/local/racket/bin")
Check exec-path.
ELISP> exec-path("/usr/local/racket/bin" "/usr/local/sbin" "/usr/local/bin" "/usr/sbin" "/usr/bin" "/sbin" "/bin" "/usr/games" "/usr/local/games" "/usr/lib/emacs/24.3/i686-linux-gnu")
Then execute M-x run-geiser.
My operating system is Ubuntu 14.04 LTS