tags:

views:

90

answers:

3

Does emacs has the feature of 'open recent'? I see that Aquamcs of Mac OS X has the open recent as a part of its menu. But, I'm curious all the emacs have this feature.

+2  A: 

Not by default, but you can easily add it. See here: blog post

Edit: I'm assuming GNU

Nathan
+2  A: 

Ordinary GNU Emacs doesn't have a menu showing recently open files. However, all Emacs commands have history, including find-file (C-x C-f). Selecting “File | Open” in the menu or opening a file with emacsclient also adds to this history. After you press C-x C-f, press up and down to navigate the history of opened files.

The history is saved between sessions if you enable session saving with the desktop package.

Gilles
+5  A: 

The most idiomatic method of providing this functionality that I know of is through the use of recentf-mode (more here). I enable it in my initialization file with:

(require 'recentf)

(recentf-mode 1)

It then provides an interactive function, recentf-open-files, which I bind to C-x f, which provides a numbered menu of recently opened files that spans sessions, i.e. even if you shut down emacs and restart it, it will retain your recently opened files. You can bind the function to an accelerator with another line in your initialization file, like:

(global-set-key "\C-xf" 'recentf-open-files)

(Optional)

If you make extensive use of Tramp, recentf will track those files too, and do it's periodic cleanup thing which can be a real mess since the files are remote. Prevent this by putting this in your startup file:

(setq recentf-auto-cleanup 'never)

R. P. Dillon