windows 10, emacs 26.1

Suppose I open 10 files. And then restart Emacs. After restart I need to see what files (recent) I was open before. Is it possible to show some buffer that contain name of this 10 files?

  • If you use ido-mode, you may like (setq ido-use-virtual-buffers t) together with recentf-mode. This allows you to switch the ido way to a previously killed file buffer, simply re-visiting the file. – YoungFrog Sep 7 '18 at 7:14

Customize recentf-mode to on and "Save and Apply". Afterwards you get an "Open recent" sub-menu in the "File" pull down menu.

You can visit and edit recentf-list by M-x recentf-edit-list.

| improve this answer | |
  • Is it possible to show recent files by some command from minibufer? – a_subscriber Sep 6 '18 at 7:27
  • 1
    If you use helm, see 'helm-recentf'. – jdtonkin Sep 6 '18 at 7:33
  • I don't like package "helm" – a_subscriber Sep 6 '18 at 7:47
| improve this answer | |

Your question is a duplicate of that one. Thanks to that reference to a blog entry, I included

(require 'recentf)
(recentf-mode 1)
(setq recentf-max-menu-items 25)
(global-set-key "\C-x\ \C-r" 'recentf-open-files)

in my .emacs file.

| improve this answer | |

In answer to your followup question in comments (it really should be a separate question, or you should edit this question to make clear that you want to use the minibuffer etc.):

If you use Icicles then:

  1. You can get recentf-recorded files as completion candidates during buffer-name completion (this happens by default) - see option icicle-buffer-include-recent-files-nflag:

    An integer > 0 means include recent files during buffer-name completion. This means file names managed by recentf-mode - see (emacs) File Conveniences. An integer < 0 means do not include them. When they are included, the value is the maximum number of such candidates to include.

    You can toggle this option (between + and -) using C-x R in the minibuffer during buffer-name completion.

  2. You can use command icicle-recent-files to open any recently visited file - only such files are completion candidates for this command. See Icicles - Visit Recent Files or Files for Emacs Tags.

  3. You can use command icicle-remove-file-from-recentf-list to remove any number of file names from the recentf-list, with completion.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.