7

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?

Drew
  • 75,699
  • 9
  • 109
  • 225
a_subscriber
  • 3,854
  • 1
  • 17
  • 47
  • 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 07 '18 at 07:14

4 Answers4

7
chen bin
  • 4,781
  • 18
  • 36
2

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.

Mario
  • 141
  • 6
1

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.

Tobias
  • 32,569
  • 1
  • 34
  • 75
1

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.

Drew
  • 75,699
  • 9
  • 109
  • 225