我正在尝试emacs用于 grails 开发。在grails-emacs-mode上试过
在我的 ubuntu 12.04 上有emacs和。emacs23
prayag@prayag:~$ ls -l /usr/share/emacs[tab][tab]
emacs/   emacs23/ 
正如 grails-emacs-mode 所建议的那样,我将文件复制grails-mode.el到primary.org我的emacs23/site-list
prayag@prayag:~$ ls -l /usr/share/emacs23/site-lisp/
total 32
-rw-r--r-- 1 root root  3013 Nov 17 00:39 debian-startup.elc
drwxr-xr-x 2 root root  4096 Nov 17 00:39 dictionaries-common
-rw-r--r-- 1 root root 18205 Feb 14 01:11 grails-mode.el
-rw-r--r-- 1 root root     0 Feb 14 01:11 primary.org
-rw-r--r-- 1 root root   106 Sep 22 01:16 subdirs.el
然后,由于主目录中不存在文件,因此在init.el内部创建。内容_.emacs.d.emacsinit.el
(require 'grails-mode)
(setq grails-mode t)
(setq project-mode t)
(add-to-list 'auto-mode-alist '("\.gsp$" . nxml-mode)) ; Use whatever mode you want for views.
(project-load-all) ; Loads all saved projects. Recommended, but not required.
现在,openingemacs23在菜单栏中没有显示任何 grails。
我也试过
M-x
load-file .emacs.d/init.el
抛出
Warning (initialization): An error occurred while loading `/home/prayag/.emacs.d/init.el':
File error: Cannot open load file, project-mode
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the `--debug-init' option to view a complete error backtrace.

启动emacs23 --debug-init时,抛出以下错误。
Debugger entered--Lisp error: (file-error "Cannot open load file" "project-mode")
  require(project-mode)
  eval-buffer(#<buffer  *load*<2>> nil "/usr/share/emacs/23.3/site-lisp/grails-mode.el" nil t)  ; Reading at buffer position 422
  load-with-code-conversion("/usr/share/emacs/23.3/site-lisp/grails-mode.el" "/usr/share/emacs/23.3/site-lisp/grails-mode.el" nil t)
  require(grails-mode)
  eval-buffer(#<buffer  *load*> nil "/home/prayag/.emacs.d/init.el" nil t)  ; Reading at buffer position 23
  load-with-code-conversion("/home/prayag/.emacs.d/init.el" "/home/prayag/.emacs.d/init.el" t t)
  load("/home/prayag/.emacs.d/init" t t)
  #[nil "\205\264