Emacs正在缓慢地打开最近的文件!
当直接打开一个文件时,速度很快,但当我打开一个最近激活的文件时,在myEmacs正在缓慢地打开最近的文件!,emacs,file,performance,Emacs,File,Performance,当直接打开一个文件时,速度很快,但当我打开一个最近激活的文件时,在my.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 ;
.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))
不应该花那么长时间 要做的一件事是清理最近的文件列表 ALT+x recentf清除 另一件事是确保你的.emacs文件是新编译的,如果你只更改了一两个字符,那么emacs会看到你的.emacs文件比编译版本更新,并且不会使用编译版本 运行以下命令: ALT+x字节编译文件 然后导航到.emacs文件并按Enter键,它将创建一个名为.emacs.elc的文件
Emacs将使用.Emacs.elc,只要它不早于您的.Emacs文件远程主机不在时,我对recentf和远程文件有问题
(setq recentf-keep '(file-remote-p file-readable-p))
可能会解决您的问题(如果远程文件仍然存在,则无需测试即可保留这些文件)。什么版本的emacs?我发现23.1在Windows上的速度不是很好。请参阅以获取一些可尝试的内容。最近我遇到了相同的问题。你解决了吗?谢谢,但不起作用。我认为我的.emacs文件太小,无法看到编译后的效果。它只是从3kb增加到2kb。