如何获得Emacs ido模式';要忽略不感兴趣的文件吗?

如何获得Emacs ido模式';要忽略不感兴趣的文件吗?,emacs,ido-mode,recent-file-list,Emacs,Ido Mode,Recent File List,如何让Emacs ido模式的recentf列表忽略不感兴趣的文件 我正在使用ido模式(函数见下文) 但现在,它首先显示无趣的文件,如下所示: -> ~/.ido-last ~/Library/Application Support/Aquamacs Emacs/recent-addresses ~/Documents/journal.org 那么如何让ido模式忽略像~/.ido last和~/Library/Application Support/Aquamacs Em

如何让Emacs ido模式的recentf列表忽略不感兴趣的文件

我正在使用ido模式(函数见下文)

但现在,它首先显示无趣的文件,如下所示:

-> ~/.ido-last
   ~/Library/Application Support/Aquamacs Emacs/recent-addresses
   ~/Documents/journal.org
那么如何让
ido模式
忽略像
~/.ido last
~/Library/Application Support/Aquamacs Emacs/recent addresses
这样的无趣文件呢? 另外,这是该函数,供参考:

(defun xsteve-ido-choose-from-recentf ()
"Use ido to select a recently opened file from the `recentf-list'"
(interactive)
(let ((home (expand-file-name (getenv "HOME"))))
(find-file
 (ido-completing-read "Recentf open: "
                      (mapcar (lambda (path)
                                (replace-regexp-in-string home "~" path))
                              recentf-list)
                      nil t))))

(global-set-key [(meta f11)] 'xsteve-ido-choose-from-recentf)

要使recentf忽略某些文件,只需将适当的regexp添加到recentf排除列表:

(add-to-list 'recentf-exclude "\\.windows\\'")
(add-to-list 'recentf-exclude "\\.revive\\'")
这将阻止将来将上述任何条目添加到recentf列表中。需要删除recentf文件中的当前条目,以便永久删除它们,或者直到它们从其他条目中逐步删除为止


来源:

要使recentf忽略某些文件,只需将适当的regexp添加到recentf排除列表:

(add-to-list 'recentf-exclude "\\.windows\\'")
(add-to-list 'recentf-exclude "\\.revive\\'")
这将阻止将来将上述任何条目添加到recentf列表中。需要删除recentf文件中的当前条目,以便永久删除它们,或者直到它们从其他条目中逐步删除为止

来源:

可能重复的可能重复的