2009-06-30 5 views
7

나는 이맥스에 완전히 익숙하며 효과적으로 사용하는 법을 배우기 시작했다.이맥스 : psvn.el 파일을 어디에 둘까요?

가장 먼저 사용하고 싶은 것은 svn 모드입니다.

내가 psvn.el를 다운로드하고 ~/.emacs.d 디렉토리 psvn.el 파일의 주석 부분의 지시에 따라 다음

에 넣어,이 라인을 넣어

(require 'psvn) 
이맥스 속으로

이 내 현재 이맥스 지금 때

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

파일입니다

파일 내가 이맥스를 시작하면 다음과 같은 오류 메시지가 나타납니다.

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를 사용하고

당신이 원하는거야

답변

12

load-path에 이멕스가 psvn을 제공하는 파일을 찾을 수 없기 때문입니다. 쉘에서

:

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

를 이맥스 초기화 파일 (자주 ~/.emacs)에서 :

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

편집 : 난 그냥 당신이 윈도우 XP에있는 것을 깨달았다. Cygwin에서이 모든 것을 처리 할 방법은 확실치 않지만 Cygwin 외부에서 절차가 거의 동일하지만 Windows XP에서는 ~%APPDATA%이라는 것을 기억하십시오. 따라서 .emacs.d.emacs이 둘 다 해당 디렉토리에 있어야합니다.

1

우선은 어디에서 찾아야하는지 알 수 있도록 부하 경로에 .emacs.d를 추가합니다. 일반적으로 대부분의 사람들은 그래서 난 이렇게 ~/.emacs.d/site-lisp.el 플러그인을 저장 :

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

지금 (require 'psvn) 잘 해결해야한다.

1

Windows에서 홈 디렉토리를 찾는 데 문제가있는 것 같습니까? Cx d ~ RETURN (홈 디렉토리에서 dired 실행)을 사용하여 홈 디렉토리가 어디에 있는지 확인한 다음 다른 대답이하는 것을 해보십시오 : psvn.el을 .emacs.d에 넣고 ~/.emacs.d를 load- 경로

관련 문제