2009-06-30 28 views
7

Emacs konusunda tamamen yeniyim ve bunu nasıl kullanacağımı öğrenmeye başlıyor.Emacs: psvn.el dosyasını nereye yerleştirelim?

Kullanmak istediğim ilk şey svn modudur.

Ben psvn.el indirilen ve ~/.emacs.d dizininin psvn.el dosyasının açıklama bölümünde talimat aşağıdaki Sonra

koydum, ben bu çizgiyi koymak

(require 'psvn) 
.emacs içine

Bu benim şimdiki .emacs Şimdi zaman

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

dosyası olduğunu

dosyası

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 

yanlış bir konumda psvn.el mi karıştırdı: Ben bu hata mesajını aldım, emacs başlar? Ben cygwin + WinXP kullanıyorum

yapmak istediğiniz gidiyoruz

cevap

12

Bunun nedeni, Emacs'in load-path numaralı telefonunda psvn sağlama dosyası bulamamasıdır. senin kabuğunda

:

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

sizin Emacs init dosyası (genellikle ~/.emacs) in:

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

DÜZENLEME: Sadece Windows XP üzerinde olduğunu fark etti. Cygwin'in bununla nasıl başa çıkacağından emin değilim, fakat bu işlem Cygwin dışında hemen hemen aynı, sadece Windows XP'de ~%APPDATA% olduğunu unutmayın, bu nedenle .emacs.d ve .emacs her ikisi de bu dizinde olmalıdır.

1

ilk şey onu nereye bakacağını bilir böylece yük yoluna .emacs.d eklemektir. Genellikle çoğu insan bu yüzden bunu ~/.emacs.d/site-lisp yılında .el eklentileri saklamak:

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

Şimdi (require 'psvn) ince dışarı çalışmalıdır.

1

Windows'ta giriş dizini bulmakta sorun mu yaşıyorsunuz? Ev dizininizin nerede olduğunu görmek için Cx d ~ RETURN (ev dizininizden yönlendirilmiş) komutunu deneyin, sonra diğer cevapların ne söylediğini yapın: psvn.el dosyasını .emacs.d dizinine yerleştirin ve yükünüze ~/.emacs.d ekleyin. yol