Emacs:将 psvn.el 文件放在哪里?
我对 emacs 完全陌生,并且开始学习如何有效地使用它。
我首先想使用的是 svn 模式。
我下载了 psvn.el 并将其放入 ~/.emacs.d 目录
然后按照 psvn.el 文件注释部分中的说明,我将这一行放入
(require 'psvn)
.emacs 文件
这是我当前的 .emacs 文件
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(inhibit-startup-screen t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(require 'psvn)
现在当我启动 emacs,收到此错误消息:
An error has occurred while loading `/home/akong/.emacs':
File error: "Cannot open load file", "psvn"
To ensure normal operation, you should investigate the cause
of the error in your initialization file and remove it. Start
Emacs with the `--debug-init' option to view a complete error
backtrace
我是否将 psvn.el 放在错误的位置?
我使用的是cygwin + WinXP
I am totally new to emacs and is starting to learn how to use it effectively.
The first thing I wanna use is the svn mode.
I downloaded psvn.el and put it in the ~/.emacs.d directory
Then following the instruction in the comment part of the psvn.el file, I put this line
(require 'psvn)
Into the .emacs file
This is my current .emacs file
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(inhibit-startup-screen t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(require 'psvn)
Now when I starts emacs, I got this error message:
An error has occurred while loading `/home/akong/.emacs':
File error: "Cannot open load file", "psvn"
To ensure normal operation, you should investigate the cause
of the error in your initialization file and remove it. Start
Emacs with the `--debug-init' option to view a complete error
backtrace
Did I put the psvn.el in a wrong location?
I am using cygwin + WinXP
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是因为 Emacs 在其
load-path
上找不到任何提供psvn
的文件。在你的 shell 中:
在你的 Emacs 初始化文件中(通常是
~/.emacs
):编辑:我刚刚意识到你使用的是 Windows XP。 我不确定 Cygwin 将如何处理所有这些,但在 Cygwin 之外的过程几乎相同,只需记住
~
在 Windows XP 上是%APPDATA%
,因此.emacs.d
和.emacs
都应该位于该目录中。This is because Emacs cannot find any file providing
psvn
on itsload-path
.In your shell:
In your Emacs init file (often
~/.emacs
):EDIT: I just realized that you are on Windows XP. I'm not sure how Cygwin will handle all of this, but the procedure is pretty much the same outside of Cygwin, just remember that
~
is%APPDATA%
on Windows XP, so.emacs.d
and.emacs
should both be in that directory.我猜您在 Windows 上查找主目录时遇到问题? 尝试 Cx d ~ RETURN (在你的主目录上运行 dired)来查看你的主目录在哪里,然后按照其他答案所说的操作:将 psvn.el 放入 .emacs.d 并在你的加载中添加 ~/.emacs.d -小路
I guess you have problem finding your home directory on Windows? Try C-x d ~ RETURN (run dired on your home directory) to see where you home directory is, then do what the other answers say: put psvn.el in .emacs.d and add ~/.emacs.d in your load-path
您要做的第一件事是将 .emacs.d 添加到您的加载路径中,以便它知道在哪里查找。 一般来说,大多数人将
.el
插件存储在~/.emacs.d/site-lisp
中,所以我这样做:现在
(require 'psvn)
应该效果很好。First thing you're going to want to do is add .emacs.d to your load path so it knows where to look. Generally most people store
.el
plugins in~/.emacs.d/site-lisp
so i do this:Now
(require 'psvn)
should work out fine.