

"Open the recentf menu via the minubuffer, with completion. (when (equal (car l) mem) (setq ret mempos)) fact that it isn't makes me wonder if there's a preferred way of other contexts that I'm surprised it's not part of Emacs, and the This function is not specific to recentf mode but is needed by (mapcar 'cdr (recentf-filtered-list ,arg)) When FN is `'car' return the menu entry names, when FN is `'cdr' "Return a list of ARG recentf menu entries as determined by FN. (delq nil (mapcar 'car (recentf-filtered-list arg))))) (if (listp (cdar (recentf-filtered-list arg))) submenues exist "Return a list of the recentf submenu names." (butlast recentf-list (- (length recentf-list) arg))))) (mapcar 'recentf-make-default-menu-element "Return a filtered list of ARG recentf items." (I find it convenient to globally bind ‘C-c r’ to the command ‘recentf-minibuffer-dialog’.) – SteveBerman (defun recentf-filtered-list (arg)

#EMACS SAVE AND QUIT CODE#
So I wrote some code that makes the filtering and structuring of the recent file menu accessible from the minibuffer, with standard tabbed completion. Steve: Why don’t you upload this as an Emacs-Lisp library? – DrewAdams One of the features of recentf.el that I find most useful is the possibility of filtering ‘recentf-list’ and structuring the recent file menu in accordance with the filter. This requires enabling recursive minibuffer editing: (setq enable-recursive-minibuffers t). Here is Steve’s commentary, followed by his code. , SteveBerman posted some code to that takes recentf filters into account in another way.

If you use, say, the recentf filter ‘recentf-arrange-by-dir’, then the File > Open Recent menu is organized by directory, and this is reflected in the completion candidates used by ‘lacarte-execute-menu-command’. You can take advantage of recentf filters (that is, structured menus) from the keyboard (with completion and so on) by using library LaCarte.Īssuming that you have ‘ESC ESC x’ (that is, ‘ESC M-x’) bound to ‘lacarte-execute-menu-command’ (which you should -)), just type part of a recent file name (any part, or a regexp), then hit ‘S-TAB’ to complete to matching recent files. This section describes ways to take advantage of that menu organization at the keyboard, with completion. Recentf lets you structure its menus in various ways, using what it calls filters.

every 5 minutes: (run-at-time nil (* 5 60) 'recentf-save-list) If Emacs exits abruptly for some reason the recent file list will be lost - therefore you may wish to call `recentf-save-list` periodically, e.g. Periodically saving the list of filesīy default, Recentf saves the list of recent files on exiting Emacs (specifically, `recentf-save-list` is called on `kill-emacs-hook`). This mode has been part of GNU Emacs since version 21. (global-set-key " \C-x \ \C-r" 'recentf-open-files) To enable ‘recentf-mode’, put this in your `~/.emacs’: (recentf-mode 1) This list is automatically saved across sessions on exiting Emacs - you can then access this list through a command or the menu. M-h (mark-paragraph) Sets region around paragraph.Recentf is a minor mode that builds a list of recently opened files. (mark-word) Sets region around the next word. M-x transient-mark-mode Also makes marked region visible. C-x C-x Lets you see the normally invisible marked region. Marking C-SPC (set-mark-command) Set mark. M-% (query-replace) Interactive replacing of text. Replace Text M-x replace-regexp M-x replace-string Will engage the replace string macro. C-h k C-s Guide to more commands available in incremental search. C-M-s Regular expression incremental search. C-r (isearch-backward) Initiates a reverse search. Hitting the meta key will stop a successful search. After a search has found something, hitting C-s again will go to the next match. C-s (isearch-forward) Initiate a forward incremental search. M-x follow-mode When you have split window, other window scrolls with you. M-x flyspell-mode Highlight misspelled words as you type. M-x auto-fill-mode Breaks lines in between words. They act as toggles so doing them a second time turns them on/off. Minor modes are modifications of the major mode. M-x text-mode For working with plain text. C-h m View documentation on your current major mode. Modes: Fundamental, Text, Outline, lisp, tcl, c, cc, cperl, python. C-x C-u (uppercase-region) Make the region all uppercase. C-x C-l (downcase-region) Make the region all lowercase. M-l (downcase-word) Make the word all lowercase. M-u (upcase-word) Make the word all uppercase. M-c (capitalize-word) Capitalize the first letter of the current word. C-x C-t (transpose-lines, -sentences, -paragraphs) Switches them. C-t (transpose-chars) Transpose two characters. Revert buffer will return the buffer to the state of when it was last autosaved. Applies only to commands that alter the text. C-_ C-/ C-x u (advertised-undo, revert-buffer) Undo.
