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)

It's good to give recentf-open-files a easy key. [see Emacs: How to Define Keys]

ErgoEmacs mascot-s276x226
Buy Xah Emacs Tutorial

Emacs, File and Buffer


Emacs Tutorial

Quick Start

Font

Split Window

File

Buffer

Find Replace

Copy/Paste

Unicode

Whitespace

Rectangle Edit

Line Wrap

Shell

View Special File

Editing Brackets

Org Mode

HTML

Emacs Efficiency

Misc