Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs: Where to put the psvn.el file?

Tags:

emacs

cygwin

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

like image 718
Anthony Kong Avatar asked Jun 30 '09 07:06

Anthony Kong


1 Answers

This is because Emacs cannot find any file providing psvn on its load-path.

In your shell:

mkdir -p ~/.emacs.d                # Make the directory unless it exists
mv /some/path/psvn.el ~/.emacs.d/  # Move psvn.el into that directory

In your Emacs init file (often ~/.emacs):

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

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.

like image 158
Deniz Dogan Avatar answered Sep 21 '22 21:09

Deniz Dogan