3

I'm currently following this guide to expanding my emacs configuration on my Mac OS X system.

However, every time I (save-buffer) with C-x C-s, I get the following error message:

apply: Searching for program: No such file or directory, global

I installed GNU Global from homebrew, and have included it in my emacs path (when I print out the PATH variable, I get this in my minibuffer:

/usr/bin:/bin:/usr/sbin:/sbin: ... /:/usr/local/Cellar/global/6.6.2_1

As you can see, I have the GNU Global installation where in the Cellar directory, and have included this directory in my emacs path.

I'm not sure what's causing the error, or even how to fix it. Is there anything I can print out to help debug this?

4
  • How do you print the path?
    – wvxvw
    Commented May 10, 2018 at 9:59
  • 1
    Check if Emacs is able to find global in PATH by evaluating (executable-find "global"). You can do it simply by yanking this code into a scratch buffer and typing C-j with point after the expression. It should NOT return nil.
    – user12563
    Commented May 10, 2018 at 11:48
  • Okay, the lisp command returned nil. I even changed the path to /usr/local/Cellar and /usr/local/Cellar/global/ but still nothing is working. I checked with brew and I definitely do have the GNU Global application @wvxvw I print the path with (getenv "PATH") Commented May 10, 2018 at 17:03
  • Okay, so I did some digging around and this was the problem: (executable-find [var] ) Doesn't look in PATH. it looks in "exec-path". Exec-path for me didn't have the 'usr/local/bin' directory. To fix this, i just did: (setq exec-path (cons "usr/local/bin" exec-path)) Now, I can find global with no problems! Commented May 10, 2018 at 18:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.