Emacs 24 Can't Find Ls

Emacs 24 Can't Find Ls

I installed emacs-snapshot through

Everything works fine except when I run dired I get this error:

Debugger entered--Lisp error: (file-error "Searching for program" "no such file or directory" "ls")
call-process("ls" nil nil nil "--dired")
1

2 Answers

I was able to fix this with:

(setenv "PATH" (concat (getenv "PATH") ":/bin"))
(setq exec-path (append exec-path '("/bin")))

Your path is probably wrong. I use cygwin for 64 bit processors. Change your configuration as in the following picture: Settings of CYGWIN's environment variable on Windows 10. Pay attention to two lines from the two windows. For one thing CYGWIN is set as an environment variable via windows 10 settings. Put both the root folder and the bin folder's local address there. Lastly, open the environment variable PATH by double clicking on it and add a new line. Just type %CYGWIN% just like how I did in the picture above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Robert Thorne
Author

Robert Thorne

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.