2009-06-30 6 views
7

Ich bin völlig neu in Emacs und fange an zu lernen, wie man es effektiv nutzt.Emacs: Wohin mit der psvn.el-Datei?

Das erste, was ich verwenden möchte, ist der SVN-Modus.

ich psvn.el heruntergeladen und steckte es in die ~/.emacs.d Verzeichnis

Dann nach der Anweisung im Kommentarteil der psvn.el Datei, habe ich diese Zeile

(require 'psvn) 

In der Datei .emacs

Dies ist meine aktuelle .emacs

Datei
(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) 

Nun, wenn Ich starte Emacs, ich habe folgende Fehlermeldung:

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 

Habe ich die psvn.el an einem falschen Ort?

ich Cygwin + WinXP bin mit

Antwort

12

Dies liegt daran, Emacs kann keine Datei finden psvn auf load-path.

In der 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 Ihrem Emacs init-Datei (oft ~/.emacs):

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

EDIT: Ich habe erkannt, dass Sie unter Windows XP sind. Ich bin mir nicht sicher, wie Cygwin all dies handhaben wird, aber das Verfahren ist außerhalb von Cygwin ziemlich gleich, nur daran erinnern, dass ~%APPDATA% auf Windows XP ist, also sollten .emacs.d und .emacs beide in diesem Verzeichnis sein.

1

Das erste, was Sie gehen zu wollen .emacs.d auf Ihre Lastpfad zu tun ist hinzuzufügen, so weiß es, wo sie suchen. Im Allgemeinen die meisten Menschen speichern .el Plugins in ~/.emacs.d/site-lisp so ich dies tun:

;; >>> 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") 

Jetzt (require 'psvn) sollte gut funktionieren.

1

Ich vermute, Sie haben Probleme bei der Suche nach Ihrem Home-Verzeichnis unter Windows? Versuchen Sie Cx d ~ RETURN (laufen Sie direkt in Ihrem Home-Verzeichnis), um zu sehen, wo Ihr Home-Verzeichnis ist, dann tun Sie, was die anderen Antworten sagen: put psvn.el in .emacs.d und fügen Sie ~/.emacs.d in Ihre Lade- Pfad