File tree 2 files changed +29
-6
lines changed 2 files changed +29
-6
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,13 @@ Key Bindings.
43
43
44
44
** File finding
45
45
#+begin_src emacs-lisp
46
- (global-set-key (kbd "C-x M-f") 'ido-find-file-other-window)
47
- (global-set-key (kbd "C-x C-p") 'find-file-at-point)
48
- (global-set-key (kbd "C-c y") 'bury-buffer)
49
- (global-set-key (kbd "C-c r") 'revert-buffer)
50
- (global-set-key (kbd "M-`") 'file-cache-minibuffer-complete)
51
- (global-set-key (kbd "C-x C-b") 'ibuffer)
46
+ (global-set-key (kbd "C-x M-f") 'ido-find-file-other-window)
47
+ (global-set-key (kbd "C-x C-p") 'find-file-at-point)
48
+ (global-set-key (kbd "C-c y") 'bury-buffer)
49
+ (global-set-key (kbd "C-c r") 'revert-buffer)
50
+ (global-set-key (kbd "M-`") 'file-cache-minibuffer-complete)
51
+ (global-set-key (kbd "C-x C-b") 'ibuffer)
52
+ (global-set-key (kbd "C-x f") 'recentf-ido-find-file)
52
53
#+end_src
53
54
54
55
** Window switching. (C-x o goes to the next window)
Original file line number Diff line number Diff line change @@ -51,3 +51,25 @@ a lambda doesn't already exist in the list.
51
51
"Enable things that are convenient across all coding buffers."
52
52
(run-hooks 'starter-kit-coding-hook))
53
53
#+end_src
54
+
55
+ #+srcname: starter-kit-recentf-ido-find-file
56
+ #+begin_src emacs-lisp
57
+ (defun recentf-ido-find-file ()
58
+ "Find a recent file using Ido."
59
+ (interactive)
60
+ (let* ((file-assoc-list
61
+ (mapcar (lambda (x)
62
+ (cons (file-name-nondirectory x)
63
+ x))
64
+ recentf-list))
65
+ (filename-list
66
+ (remove-duplicates (mapcar #'car file-assoc-list)
67
+ :test #'string=))
68
+ (filename (ido-completing-read "Choose recent file: "
69
+ filename-list
70
+ nil
71
+ t)))
72
+ (when filename
73
+ (find-file (cdr (assoc filename
74
+ file-assoc-list))))))
75
+ #+end_src
You can’t perform that action at this time.
0 commit comments