Why can't the execution program be found in emacs?

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.