2010-01-15 22 views
6

doğrudan hızlı bir dosya açılırken, ama bu benim .emacs. aşağıdaki satırları ekleyerek etkinleştirilir son dosyayı açtığınızda:Emacs, son dosyaları yavaşça açıyor!

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

açılmasına izin yaklaşık 2 saniye sürer.

Bu normal bir davranış mı? Bu konuda bir şeyler yapabilir miyim?

Ben son dosyaları açmak için kullanmak komut:

Benim bütün .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

Windows XP SP2 kullanıyorum – alexchenco

+0

Hangi sürümlerde emacs? Ben 23.1 Windows üzerinde bu büyük hız-o değil bulduk. – luapyad

+0

Evet, Emacs 23.1 kullanıyorum. – alexchenco

cevap

9

Uzaktaki ana bilgisayardayken recentf ve uzak dosya ile ilgili sorun yaşıyorum gitmiş.

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

Sorununuzu çözebilir (uzak dosya hala varsa test edilmeden saklanacaktır).

+0

Teşekkürler ama işe yaramadı – alexchenco

+0

Benim için mükemmel çalışıyor. –

2

O kadar uzun sürebilir olmamalıdır.

Yapılacak bir şey, son dosya listenizi temizlemektir.

ALT + x recentf-temizleme sonra Emacs göreceksiniz

hatta sadece bir karakter ya da iki değiştirdiyseniz, senin .emacs dosya taze derlenmiş olduğundan emin olun yapmanız Başka bir şey .emacs dosyanız derlenmiş sürümden daha yenidir ve derlenmiş sürümü kullanmaz.

çalıştırın bu:

ALT + x bayt derleme dosyası

Sonra .emacs dosyaya gidip ve Giriş tuşuna basınız, bu

.emacs.elc adlı bir dosya oluşturur

Emacs, .emacs dosyanızdan daha eski olmadıkları sürece .emacs.elc kullanamazsınız

+0

Teşekkürler ama işe yaramadı. Benim .emacs dosyası derlenmiş efekti görmek için çok küçük olduğunu düşünüyorum. Sadece 3kb'den 2kb'ye çıktı. – alexchenco