2009-06-30 15 views
7

मैं पूरी तरह से emacs के लिए नया हूँ और सीखना शुरू कर रहा है कि इसका प्रभावी ढंग से उपयोग कैसे करें।Emacs: psvn.el फ़ाइल कहां डालें?

पहली चीज़ जो मैं उपयोग करना चाहता हूं वह svn मोड है।

मैं psvn.el डाउनलोड किया है और ~/.emacs.d निर्देशिका

psvn.el फ़ाइल की टिप्पणी भाग में अनुदेश निम्नलिखित

तब में रख, मैं इस लाइन डाल

(require 'psvn) 

.emacs में फ़ाइल

यह मेरे वर्तमान .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 उपयोग कर रहा हूँ

उत्तर

12

ऐसा इसलिए है क्योंकि Emacs को 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 init फ़ाइल (अक्सर ~/.emacs) में:

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

संपादित करें: मैं बस महसूस किया कि आप 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

मुझे लगता है कि आपको विंडोज़ पर अपनी होम निर्देशिका खोजने में समस्या है? सीएक्स डी ~ रिटर्न (अपने घर निर्देशिका पर चलाया गया रन) देखें कि आप कहां घर निर्देशिका कहां है, फिर अन्य उत्तरों क्या कहें: psvn.el को .emacs.d में डालें और अपने लोड में ~/.emacs.d जोड़ें। पथ

संबंधित मुद्दे