使用ido完成方法更改emacs存储中recentf的文件数

使用ido完成方法更改emacs存储中recentf的文件数,emacs,elisp,recent-file-list,Emacs,Elisp,Recent File List,我正在使用本页列出的ido方法: . 我希望能够选择它存储的最近文件的数量。它似乎储存的东西不多。是否有这样的设置或简单的方法。下面列出的函数仅供参考。干杯 (defun recentf-interactive-complete () "find a file in the recently open file using ido for completion" (interactive) (let* ((all-files recentf-list) (file-

我正在使用本页列出的ido方法: . 我希望能够选择它存储的最近文件的数量。它似乎储存的东西不多。是否有这样的设置或简单的方法。下面列出的函数仅供参考。干杯

    (defun recentf-interactive-complete ()
  "find a file in the recently open file using ido for completion"
  (interactive)
  (let* ((all-files recentf-list)
     (file-assoc-list (mapcar (lambda (x) (cons (file-name-nondirectory x) x)) all-files))
     (filename-list (remove-duplicates (mapcar 'car file-assoc-list) :test 'string=))
     (ido-make-buffer-list-hook
      (lambda ()
        (setq ido-temp-list filename-list)))
     (filename (ido-read-buffer "Find Recent File: "))
     (result-list (delq nil (mapcar (lambda (x) (if (string= (car x) filename) (cdr x))) file-assoc-list)))
     (result-length (length result-list)))
    (find-file 
     (cond 
      ((= result-length 0) filename)
      ((= result-length 1) (car result-list))
      ( t
    (let ( (ido-make-buffer-list-hook
        (lambda ()
          (setq ido-temp-list result-list))))
      (ido-read-buffer (format "%d matches:" result-length))))
      ))))

可能需要将
recentf max saved items
设置为指定值,例如:

(setq recentf-max-saved-items 30) ; or what ever you want

可能需要将
recentf max saved items
设置为指定值,例如:

(setq recentf-max-saved-items 30) ; or what ever you want

这似乎与旧版本中的
recentf max菜单项
不同。否,
recentf max菜单项
决定显示多少项,而不是保存多少项。例如,您可以保存最近的500个项目,并且只显示前30个项目。(当你想利用更深层的历史记录时,你可以使用ido或其他东西)这似乎与旧版本中的
recentf max菜单项
有所不同。不,
recentf max菜单项
决定显示多少项,而不是保存多少项。例如,您可以保存最近的500个项目,并且只显示前30个项目。(当你想利用更深刻的历史时,你可以使用ido或其他东西)