繁体   English   中英

Emacs无法加载其启动文件

[英]Emacs unable to load its startup files

我将远程终端上的emacs升级为23-snapshot。 因为我没有root权限,所以我做了'make install'并将'prefix'设置为我的主目录中的文件夹。 现在当我启动emacs时,它会出现错误'无法打开加载文件:encoded-kb',它也无法运行dired或加载cc-mode。 我尝试用'--no-site-file',' - Q',' - q'启动它,都有同样的问题。 我的.emacs是空的。 有什么建议么?

谢谢你的帮助。

此致,Nishith

更新:这些是我尝试运行'emacs'时没有参数的消息。

Warning: arch-dependent data dir (/usr/local/libexec/emacs/23.0.93/x86_64-unknown-linux-gnu/) does not exist.
Warning: Lisp directory `/usr/local/share/emacs/23.0.93/site-lisp' does not exist.
Warning: Lisp directory `/usr/local/share/emacs/site-lisp' does not exist.
Warning: Lisp directory `/usr/local/share/emacs/23.0.93/lisp' does not exist.
Warning: Lisp directory `/usr/local/share/emacs/23.0.93/leim' does not exist.

它是一个64位系统。 Emacs源代码来自cvs使用

cvs -d:pserver:anonymous@cvs.sv.gnu.org:/sources/emacs co emacs

update2:谢谢Charlie和Trey的回答。 我想我会跳过'make install'并坚持暂时使用src / emacs。 干杯。

对我来说,当我不改变Makefile中的prefix变量时,这个错误消失了,做了一个:

./configure --prefix=/my_special_path/usr/local

在我的情况下,我的MacOSX只是指向旧版本的Emacs,我不知道为什么。 所以,当我在图形界面上打开它时一切都还可以,但当我试图在终端上打开它时,我得到了那个错误。 所以,我首先找到快捷方式指向的位置并修复/usr/bin/emacs路径,如下所示:

$ emacs --version
GNU Emacs 22.1.1
Copyright (C) 2007 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
$ whereis emacs
/usr/bin/emacs
$ sudo rm /usr/bin/emacs 
$ sudo ln -s /usr/local/Cellar/emacs/HEAD/bin/emacs /usr/bin/emacs
$ emacs --version
GNU Emacs 24.4.50.1
Copyright (C) 2014 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

“编码- kb.el”是在的Emacs Lisp目录标准的国际化代码,所以事情没有得到正确的道路。 你的负载路径在某个地方被冲洗了。 makefile中有一些钩子可以让你明确设置加载路径应该修复的内容。

尝试在启动后转储加载路径,比如说(pp load-path)并查看它真正看到的内容。 要评估,请键入

(pp load-path)^j

在你的*scratch*缓冲区中。 该缓冲区应该处于lisp交互模式。 ^j (Control-j,又名Cj)说要评估它。 pp将打印清单。

我遇到了在AIX上构建emacs 23.1的同样问题。 在我的情况下,我想在我的目录中安装emacs,因为我是唯一使用emacs的开发人员。 可以通过在运行configure之前修改src / epaths.in文件中的路径来解决此问题。 配置使用此文件来创建epaths.h。 --prefix =参数不会更改epaths.in文件中的路径。 使用--prefix =并修改epaths.in文件修复了我的问题。

我遇到了在Windows 7上构建emacs 25.0.92的同样问题。

D:\emacs\bin>emacs
Warning: arch-dependent data dir 'd:/emacs/libexec/emacs/24.5/x86_64-w64-mingw32/': Invalid argument
Warning: arch-independent data dir 'd:/emacs/share/emacs/24.5/etc/': Invalid argument
Warning: Lisp directory 'd:/emacs/share/emacs/24.5/site-lisp': Invalid argument
Warning: Lisp directory 'D:/emacs/share/emacs/24.5/lisp': Invalid argument

我发现了这个问题。 有一个系统注册表项: HKEY_LOCAL_MACHINE\\SOFTWARE\\GNU\\Emacs ,它定义了加载路径EMACSLOADPATH

我只是删除注册表项来解决问题。

如果要在系统范围内安装软件包, make install AFAIK。 前缀仅定义该系统范围安装的前缀路径,但仍需要正确的目录层次结构(bin /,/ lib,/ share等)。 如果您只想使用CVS Emacs,可以在make过程后立即运行它。 例如,我的Emacs源代码位于~/src/emacs/ ,我只需输入~/src/emacs/src/emacs即可运行Emacs。

还要检查是否有一个名为EMACSPATH的环境变量。 Emacs希望它是一个目录。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM