Emacs不承认自己的脚本在/ emacs / lisp / [英] Emacs not recognizing its own scripts in /emacs/lisp/

查看:93
本文介绍了Emacs不承认自己的脚本在/ emacs / lisp /的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我非常喜欢emacs,而我在Windows上使用的是23.2版本。我试图让CEDET工作,但是当我需要它在.emacs它找不到文件:

 文件错误:无法打开加载文件

我可以通过手动加载来获取cedet的工作:

 (加载C:/emacs/lisp/cedet/cedet.el)
/ pre>

但是我仍然不能要求cedet等其他文件,如semantic-gcc或semantic-ia。



这是我的.emacs文件:

 (加载C: )
(global-ede-mode t)
(语义模式1)
;(semantic-load-enable-excess-code-帮助者)
(require'semantic-ia)
(require'semantic-gcc)

这就像emacs不是在自己的路径中找到这些文件,而且我也尝试过

 (add-to -list'load-pathC:/ emacs / lisp / cedet)

解决方案

首先,您需要找到一个简单的(require'cedet)


  1. Emacs安装在 c :\emacs ? (即您正在运行的emacs.exe是c:\emacs\bin\emacs.exe)

  2. 设置 EMACSLOADPATH HKEY_LOCAL_MACHINE HKEY_CURRENT_USER 软件/ GNU / Emacs

  3. 在您的加载路径上是否安装了较旧版本的CEDET?

  4. 已经编辑了 c:\emacs\lisp\subdirs.el 以删除cedet子目录?

一旦你解决了这个问题,请注意,当CEDET被合并到Emacs中以容纳对文件名长度有限制的旧系统时,这些路径被改变,但是与此同时,所以你不应该需要明确地要求这些文件,如果你仍然这样做,下面的工作应该是:

 (require '语义/ ia)
(需要语义/牛/ gcc)


I'm very new to emacs and I'm using version 23.2 on Windows. I'm trying to get CEDET working, but when I require it in .emacs it fails to find the file:

File error: Cannot open load file

I was able to get cedet working by loading it manually with:

 (load "C:/emacs/lisp/cedet/cedet.el")

But I still can't require other files from cedet like semantic-gcc or semantic-ia.

Here's my .emacs file:

(load "C:/emacs/lisp/cedet/cedet.el")
(global-ede-mode t)
(semantic-mode 1)
;(semantic-load-enable-excessive-code-helpers)
(require 'semantic-ia)
(require 'semantic-gcc)

It's like emacs isn't looking for these files in its own path, and I did try

(add-to-list 'load-path "C:/emacs/lisp/cedet")

With a lot of other variations but none worked.

解决方案

Firstly, you need to find the reason that cedet won't load with a simple (require 'cedet).

  1. Is Emacs installed at c:\emacs? (ie the emacs.exe you are running is c:\emacs\bin\emacs.exe)
  2. Is something setting EMACSLOADPATH externally from Emacs (your environment, or in the registry under HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER /Software/GNU/Emacs?
  3. Is there another installation of an older version of CEDET on your load path?
  4. Has c:\emacs\lisp\subdirs.el been edited to remove the cedet subdirectory?

Once you've solved that, note that the paths were changed when CEDET was merged into Emacs to accommodate old systems that have limitations on file name lengths. But at the same time, the autoloads were improved, so you shouldn't need to explicitly require those files any more. If you still do, the following should work:

(require 'semantic/ia)
(require 'semantic/bovine/gcc)

这篇关于Emacs不承认自己的脚本在/ emacs / lisp /的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆