1

For some reason certain executables are not being found when I add them to the load patch but others are, while n the same directory. For example I got clang-format under usr/local/bin and I have

(setq exec-path (append exec-path '("/usr/local/bin")))
(require 'clang-format)

This in my init.el. It works just fine.

Now I installed hindent for Haskell (https://github.com/commercialhaskell/hindent) and put the executable hindent also under usr/local/bin.

In the same fashion I put

(setq exec-path (append exec-path '("/usr/local/bin")))
(require 'hindent)

in my init.el.

However when I load Emacs (GUI and shell) I will get "cannot open load file: No such file or directory, hindent".

Has this to do with emacs? I don't see why it would produce an error for the one file but not the other.

  • 4
    exec-path is where subprocesses find executable files. so your emacs should be able to find the executable. However, require is looking not for the executable, but for hindent.el (or the compiled file) which is the emacs lisp interface to hindent. You have to modify load-path for that (or put hindent.el in one of the directories that is in the load path already). – NickD Dec 26 '17 at 1:26
  • @Nick: Please post that as an answer. OP: Please consider accepting it as the answer (unless you get another answer that you find more appropriate). – Drew Dec 26 '17 at 17:20
1

exec-path is where subprocesses find executable files. so your emacs should be able to find the executable. However, require is looking not for the executable, but for hindent.el (or the coresponding compiled file hindent.elc) which is the emacs lisp interface to hindent. You have to modify load-path for that (or put hindent.el in one of the directories that is in the load path already).

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.