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

Emacs:psvn.el文件放在哪里?,emacs,cygwin,Emacs,Cygwin,我对emacs完全陌生,并开始学习如何有效地使用它 我想用的第一件事是svn模式 我下载了psvn.el并将其放在~/.emacs.d目录中 然后按照psvn.el文件注释部分中的说明,我将这一行 (require 'psvn) 到.emacs文件中 (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so

我对emacs完全陌生,并开始学习如何有效地使用它

我想用的第一件事是svn模式

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

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

(require 'psvn)
到.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文件

(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,您要做的第一件事是将.emacs.d添加到您的加载路径中,以便它知道在哪里查找。一般来说,大多数人将
.el
插件存储在
~/.emacs.d/site lisp
中,所以我这样做:

;; >>> Configure Load Path <<< ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq emacs-config-path "~/.emacs.d/")
(setq base-lisp-path "~/.emacs.d/site-lisp/")
(setq site-lisp-path (concat emacs-config-path "/site-lisp"))
(defun add-path (p)
  (add-to-list 'load-path (concat base-lisp-path p)))

;; I should really just do this recursively.
(add-path "") 
;; (add-path "some-nested-folder")

;;>>>配置加载路径这是因为Emacs在其
加载路径上找不到任何提供
psvn
的文件

在您的shell中:

mkdir -p ~/.emacs.d                # Make the directory unless it exists
mv /some/path/psvn.el ~/.emacs.d/  # Move psvn.el into that directory
在Emacs init文件中(通常为
~/.Emacs
):


编辑:我刚刚意识到你使用的是Windows XP。我不确定Cygwin将如何处理所有这些,但Cygwin之外的过程几乎相同,只要记住在Windows XP上,
~
%APPDATA%
,所以
.emacs.d
.emacs
都应该在该目录中。

我想你在Windows上查找主目录时遇到问题了吗?尝试C-x d~RETURN(在主目录上运行dired)查看主目录的位置,然后按照其他答案所说的操作:将psvn.el放入.emacs.d,并在加载路径中添加~/.emacs.d