Reputation: 32456
I am getting error: 'Searching for program: permission denied, gdb' when i try to run M-x gdb
in emacs on windows machine. I have Mingw and it is in the emacs search path (getenv "PATH")
. When I open a shell in emacs I can run gdb from the shell no problem. What causes this permission denied?
thanks
Upvotes: 1
Views: 968
Reputation: 32456
Ok, I figured it out with the help of this excellent page
Emacs has variable exec-path
that will automatically sync with "PATH" variable. However, if you customize your "PATH" variable in emacs (i.e from within init.el
), these changes won't be added to exec-path
. So, you have to manually set the exec-path
to contain the directory with the gdb executable. On the linked page there is some nice code to help keep the two paths in sync.
Upvotes: 1