Emacs: Open Recently Opened File

By Xah Lee. Date: . Last updated: .

Alt+x recentf-mode to turn it on. (it toggles on/off) Then, Alt+x recentf-open-files to list and open recently opened file.

To open the file, just press a digit key. Or, move cursor to the line and press Enter.

emacs recentf 2021-07-19
emacs recentf-mode

Turn on Recentf for Future Sessions

Put this in your Emacs Init File:

;; keep a list of recently opened files
(require 'recentf)
(recentf-mode 1)

Emacs, File and Buffer