如何让 Emacs ido-mode 的recentf-list 忽略不感兴趣的文件?
我将 ido-mode 与xSteve 的函数一起用于 ido 最近的文件(函数见下文)。
但就像现在一样,它首先显示无趣的文件,如下所示:
-> ~/.ido-last
~/Library/Application Support/Aquamacs Emacs/recent-addresses
~/Documents/journal.org
那么我如何才能ido-mode
忽略不感兴趣的文件,比如~/.ido-last
and~/Library/Application Support/Aquamacs Emacs/recent-addresses
呢?
PS这是那个功能,供参考:
(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)