gpt4 book ai didi

Emacs 打开最近的文件很慢!

转载 作者:行者123 更新时间:2023-12-04 10:45:38 25 4
gpt4 key购买 nike

直接打开文件时速度很快,但是当我打开最近激活的文件时,在 .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))

最佳答案

当远程主机消失时,我遇到了最近的文件和远程文件的问题。

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

可能会解决您的问题(如果远程文件仍然存在,则将保留而不进行测试)。

关于Emacs 打开最近的文件很慢!,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2068697/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com