I have installed GNU Go 3.8 and am trying to use it in emacs. I have downloaded gnugo.el
from here and have copied gnugo-big-xmps.el
from my gnugo-3.8/interface
directory, putting both in my .emacs.d
. I have the following two lines in my init.el
:
(autoload 'gnugo "gnugo" "GNU GO" t)
(autoload 'gnugo-xpms "gnugo-big-xpms" "GNU GO" t)
I can use M-x gnugo
, and am prompted for GNU Go options:
, but when I press RET
, I get the error Searching for program: no such file or directory, gnugo
. I don't think that this is a problem with my installation of GNU Go, since it works fine from the command line. Can anyone help?
I am using Emacs 24.5.1 on OS X El Capitan, 10.11.3.
M-h v exec-path
, and see ifgnugo
is in one of the locations listed in there. If it's not, simply add the directory wheregnugo
lives to this list. (eg.(push (shell-command-to-string "dirname $(which gnugo)") exec-path)
. – wvxvw Mar 19 '16 at 22:23(setq exec-path (append exec-path '("/usr/local/bin")))
and(setq exec-path (append exec-path '("~/Downloads/gnugo-3.8")))
, and now get the error messageCannot open load file: no such file or directory, gnugo
before even getting the prompt forGNU Go options:
– Filanator Mar 19 '16 at 23:12gnugo
isn't on theload-path
. I don't quite understand how would theutoload
work before, but it seems like you need to put the Emacs Lisp sources for the game somewhere on theload-path
(or again, add the directory with the sources to theload-path
). It was probably better to keep thegnugo.el
where it was and instead add its parent directory toload-path
. – wvxvw Mar 19 '16 at 23:29gnugo
to theload-path
, am now getting the original problem. Relevant section in myinit.el
:(add-to-list 'load-path "~/.emacs.d/gnugo-3.8/interface")
(autoload 'gnugo "~/.emacs.d/gnugo-3.8/interface/gnugo.el" "GNU GO" t)
(autoload 'gnugo-xpms "~/.emacs.d/gnugo-3.8/interface/gnugo-big-xpms.el" "GNU GO" t)
– Filanator Mar 19 '16 at 23:38M-x toggle-debug-on-error
and once you get this error, look at the backtrace (the buffer will pop-up showing the list of function calls from the last to the first).RET
on a function name in this buffer will open the function's definition, there you'll be able to see what the function was doing when it received the error (i.e. where it was trying to look forgnugo
). – wvxvw Mar 20 '16 at 6:24