2010-01-15 24 views
6

जब सीधे अपनी तेजी से एक फ़ाइल को खोलने, लेकिन जब मैं हाल ही में एक फ़ाइल है जो सक्रिय मेरी .emacs. में निम्नलिखित लाइनों को जोड़ने खोलें:Emacs हाल ही की फ़ाइलों को धीमा कर रहा है!

(require 'recentf) 
(recentf-mode 1) 
(setq recentf-max-menu-items 25) 
(global-set-key "\C-x\ \C-r" 'recentf-open-files) 

इसे खोलने के लिए लगभग 2 सेकंड लेता है।

क्या यह एक सामान्य व्यवहार है जिसके बारे में मैं कुछ कर सकता हूं?

आदेश मैं हाल ही में फ़ाइलें खोलने के लिए उपयोग करें:

मेरा पूरा .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. 
'(tool-bar-mode nil)) 
(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. 
'(default ((t (:inherit nil :stipple nil :background "Grey15" :foreground "Grey" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 92 :width normal :foundry "outline" :family "Monaco"))))) 

    ;;colot theme plugin 
(add-to-list 'load-path "~/.emacs.d/") 
(require 'color-theme) 
(eval-after-load "color-theme" 
    '(progn 
    (color-theme-initialize) 
    (color-theme-charcoal-black))) 

    ;;YASnippets 
(add-to-list 'load-path "~/.emacs.d/plugins/yasnippet-0.6.1c") 
    (require 'yasnippet) ;; not yasnippet-bundle 
    (yas/initialize) 
    (yas/load-directory "~/.emacs.d/plugins/yasnippet-0.6.1c/snippets") 

;; disable splash screen and startup message 
(setq inhibit-startup-message t) 

;; set yasnippet no indent 
(setq yas/indent-line 'none) 

;; set the tab width 
(setq default-tab-width 4) 
(setq tab-width 4) 
(setq c-basic-indent 4) 

;; set open recent files 

(require 'recentf) 
(recentf-mode 1) 
(setq recentf-max-menu-items 25) 
(global-set-key "\C-x\ \C-r" 'recentf-open-files) 

;; set line number 
(global-linum-mode 1) 

;; prevent emacs from making backup files 
(setq make-backup-files nil) 

;; same syntax hightlight for all languages 
(global-font-lock-mode 1) 

;; remove bold and underline 
(mapc 
    (lambda (face) 
    (set-face-attribute face nil :weight 'normal :underline nil)) 
    (face-list)) 
+0

मैं विंडोज एक्सपी एसपी 2 – alexchenco

+0

का उपयोग करता हूं emacs का संस्करण क्या है? मैंने पाया है कि 23.1 विंडोज़ पर बहुत तेज गति से नहीं है। – luapyad

+0

हां, मैं Emacs 23.1 का उपयोग कर रहा हूँ। – alexchenco

उत्तर

9

रिमोट होस्ट होने पर मुझे हाल ही में और दूरस्थ फ़ाइल में समस्या थी गया हुआ।

(setq recentf-keep '(file-remote-p file-readable-p)) 

आपकी समस्या का समाधान कर सकते हैं (दूरस्थ फ़ाइल परीक्षण के बिना रखी जाएगी यदि वे अभी भी मौजूद हैं)।

+0

धन्यवाद लेकिन काम नहीं किया – alexchenco

+0

यह मेरे लिए पूरी तरह से काम करता है। –

2

ऐसा नहीं है कि देर नहीं करनी चाहिए।

अपनी हाल की फाइल सूची को साफ करना एक चीज है।

एएलटी + एक्स recentf-सफाई

अगर आप भी सिर्फ एक या दो चरित्र बदल दिया है कि अपने .emacs फ़ाइल हाल में संकलित किया गया है यह सुनिश्चित कर लें है, ऐसा करने के लिए एक और बात तो Emacs कि देखेंगे आपकी .emacs फ़ाइल संकलित संस्करण से नई है और यह संकलित संस्करण का उपयोग नहीं करेगा।

भागो इस:

एएलटी + एक्स बाइट-संकलन फ़ाइल

फिर अपने .emacs फ़ाइल पर जाएँ और हिट दर्ज करें, यह

.emacs.elc नाम की एक फ़ाइल पैदा करेगा

Emacs .emacs.elc का उपयोग तब तक करेगा जब तक यह आपकी .emacs फ़ाइल से पुराना नहीं है

+0

धन्यवाद लेकिन काम नहीं किया मुझे लगता है कि संकलित प्रभाव देखने के लिए मेरी .emacs फ़ाइल बहुत छोटी है। यह सिर्फ 3kb से 2kb तक चला गया। – alexchenco

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