我想使用OS (10.6.8版)上的Emacs (23.4.1版)代替Xcode (4.2版)作为我的文本编辑器。
我已将emacs-xcode.el从https://github.com/senny/emacs-xcode复制到本地目录~/.emacs.d/emacs-xcode/emacs-xcode.el
在.emacs,我有
(add-to-list 'load-path (expand-file-name "~/.emacs.d/emacs-xcode/"))
(require 'xcode)当我运行Emacs时,它会发出警告:
Warning (initialization): An error occurred while loading `/Users/thunderrabbit/.emacs':
File error: Cannot open load file, xcode在.emacs,我也尝试过
(add-to-list 'load-path (expand-file-name "~/.emacs.d/emacs-xcode/emacs-xcode.el"))
(require 'xcode)对于那些比xcode更熟悉Emacs的人,在~/.emacs.d/emacs-xcode/emacs-xcode.el的末尾是行
(provide 'xcode)我假设它是与(require 'xcode)中的.emacs配对的
编辑:我在(require 'monkey)的末尾添加了emacs-xcode.el,Emacs没有抱怨它不能加载猴子。因此,似乎根本没有加载emacs-xcode.el。
emacs-xcode.el由我拥有,权限为644。它的父目录由我拥有,权限为755。
为什么它不被打开?
注:我剪切了文件名,所以我确信它们拼写正确。
发布于 2012-05-22 16:37:14
您的问题是,带有provide语句的文件的名称与require语句中的符号名称不相同,因此Emacs不知道要在哪个文件中查找。
您可以重命名库xcode.el,也可以使用显式文件名来要求它:
(require 'xcode "emacs-xcode")发布于 2012-05-22 14:29:03
我在这里找到了一个线索,Emacs not recognizing its own scripts in /emacs/lisp/
我通过将(load "emacs-xcode.el")添加到我的.emacs中来解决这个问题
(add-to-list 'load-path (expand-file-name "~/.emacs.d/emacs-xcode/"))
(load "emacs-xcode.el")
(require 'xcode)我暂时不会选择我的答案,以防其他人有更好的解决方案。
https://stackoverflow.com/questions/10703613
复制相似问题