Emacs:在哪里放psvn.el文件?

Ant*_*ong 7 emacs cygwin

我是emacs的新手,并开始学习如何有效地使用它.

我想要使​​用的第一件事是svn模式.

我下载了psvn.el并将其放在〜/ .emacs.d目录中

然后按照psvn.el文件的注释部分中的说明,我把这一行

(require 'psvn)
Run Code Online (Sandbox Code Playgroud)

进入.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)
Run Code Online (Sandbox Code Playgroud)

现在当我启动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
Run Code Online (Sandbox Code Playgroud)

我把psvn.el放在了错误的位置吗?

我正在使用cygwin + WinXP

Den*_*gan 13

这是因为Emacs中无法找到任何文件提供psvnload-path.

在你的shell中:

mkdir -p ~/.emacs.d                # Make the directory unless it exists
mv /some/path/psvn.el ~/.emacs.d/  # Move psvn.el into that directory
Run Code Online (Sandbox Code Playgroud)

在您的Emacs init文件中(通常~/.emacs):

(add-to-list 'load-path "~/.emacs.d")  ; Add this directory to Emacs' load path
(require 'psvn)                        ; Load psvn
Run Code Online (Sandbox Code Playgroud)

编辑:我刚刚意识到你在Windows XP上.我不知道Cygwin的将如何处理这一切,但程序是几乎相同的Cygwin以外,只记得~%APPDATA%在Windows XP,所以.emacs.d.emacs都应该在该目录中.