Here is another possible implementation I use:
(defun my-recentf-open-file-from-minibuffer (&optional arg)
"Open a recent file from the minibuffer, with completion.
Prompt for an item of the recentf menu, until a file is selected.
By default, consider only the `recentf-max-menu-items' most recent
files. \\[universal-argument] \\[my-recentf-complete] consider all
files. With optional argument ARG a positive integer, consider the
ARG most recent files."
(interactive "P")
(let* ((pr recentf-menu-title)
(tb (recentf-apply-menu-filter
recentf-menu-filter
(mapcar 'recentf-make-default-menu-element
(cond
((null arg)
(recentf-elements recentf-max-menu-items))
((natnump arg)
(recentf-elements arg))
(recentf-list)))))
(e (assoc (completing-read (concat pr ": ") tb nil t) tb)))
(while (and (consp e) (consp (cdr e)))
(setq tb (cdr e)
pr (concat pr "/" (car e))
e (assoc (completing-read (concat pr ": ") tb nil t) tb)))
(when (and (consp e) (stringp (cdr e)))
(funcall recentf-menu-action (cdr e)))))
Great. Why don't you add that too to the Emacs-Wiki page in the same section
("Recentf Filters (Structured Menu)"):
http://www.emacswiki.org/cgi-bin/emacs/RecentFiles.
_______________________________________________
gnu-emacs-sources mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources