summaryrefslogtreecommitdiff
path: root/recentf-conf.el
diff options
context:
space:
mode:
Diffstat (limited to 'recentf-conf.el')
-rw-r--r--recentf-conf.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/recentf-conf.el b/recentf-conf.el
new file mode 100644
index 0000000..3097b66
--- /dev/null
+++ b/recentf-conf.el
@@ -0,0 +1,16 @@
+;;; recentf-conf.el --- My configurations concerning recentf -*- lexical-binding: t; -*-
+
+(require 'recentf)
+
+(set 'recentf-save-file (expand-file-name "recentf" load-file-directory))
+
+(recentf-mode 1)
+
+;;;###autoload
+(defun choose-recent-file ()
+ "Choose a recently visited file to visit.
+This uses `completing-read' to choose a file from `recentf-list'."
+ (interactive)
+ (let ((choice (completing-read "Choose a recently visited file: "
+ recentf-list 'file-exists-p t)))
+ (find-file choice)))