There's also a package on MELPA for this now: dashboard: https://github.com/rakanalh/emacs-dashboard. The package allows you to have a splash screen as in the image below:
Here's the use-package snippet from my config to set it up with a custom banner image and line of text, as well as a list of recent files and bookmarks:
How do I remove the files that do not exist from recent files list?
recentf-cleanup is an interactive compiled Lisp function in
Cleanup the recent list.
That is, remove duplicates, non-kept, and excluded files.
See also the user options recentf-auto-cleanup:
recentf-auto-cleanup is a variable ...
When you open emacs, open several files and exit emacs using C-x C-c (graceful exit), it will call the recentf-save-list function which saves recently opened files to a file specified by recentf-save-file.
On the other hand if you kill emacs using kill, it is NOT a graceful exit and there is no chance for emacs to save the files. So they will not be there ...
Manomagically :D, after posting the question I got the working solution by removing one single quote below in my .emacs
(setq initial-buffer-choice '(helm-recentf)) ;; Does not work
(setq initial-buffer-choice (helm-recentf)) ;; Works!!!
;; I still haven't tried doing with the built-in recentf only
(setq initial-buffer-choice 'helm-...
You can set it with
(setq recentf-save-file (expand-file-name "recentf" <other-directory>))
You can usually find settings like this by looking at the help for one of the functions, e.g. recentf-mode, then following the link to the source code, and then doing occur for defcustom to find one that looks like it might be a file storage location - e.g. in ...
One solution for that narrow case is to dynamically set save-silently for that invocation specific invocation. Try:
(run-at-time nil (* 5 60)
(let ((save-silently t))
You might alternatively use advice to globally accomplish the same thing. See Advising Functions in the Emacs ...
Ivy already has an action bound to "k" for ivy-switch-buffer, but it just calls kill-buffer so it does not work on virtual buffers.
Based on what ido is doing, here's some code to replace the default ivy kill action with one that also handles virtual buffers by dropping them from the recentf list:
(defun my-ivy-kill-buffer (buf)
According to https://github.com/abo-abo/swiper/issues/648, it's simply
(setq ivy-virtual-abbreviate 'full)
It's not quite as nice as opened buffers (where only the differing part is shown), but good enough.
(I haven't found anything like that for ido though.)
(add-to-list 'recentf-exclude "company-statistics-cache.el")
or more accurately
then run M-x recentf-cleanup to make it work.
Anyway, the regexp you set in recentf-exclude must match the $HOME/.emacs.d/company-statistics-cache.el (~ is expanded into $...
You can save recent files just before shutdown by calling recentf-save-list
M-x recentf-save-list RET
This adds your recent files to recentf history.
If you dont want to do this manually, you can add a timer which will do that for you every 5 minutes.
(run-at-time (current-time) 300 'recentf-save-list)
Add this to your config. So whenever you open emacs,...
To determine where the recentf file is, you can query the variable recentf-save-file. By default, that is ~/.emacs.d/recentf. In spacemacs that is ~/.emacs.d/.cache/recentf.
You can copy this file over to the new machine, or you can open the file and copy the entries. AFAIK there is no functionality to import/export, as that's a very exclusive use case and ...
You can let-bind find-file-hook to prevent Recentf from recording the file, e.g.,
(let ((find-file-hook (remq 'recentf-track-opened-file find-file-hook)))
Then to bypass Recentf during M-x org-agenda, use this:
(define-advice org-agenda (:around (old-fun &rest args) skip-recentf)
(let ((find-file-hook (remq 'recentf-track-...
I am not sure if this is what you are looking for and if it works in spacemacs. I am using standard emacs and desktop-save-mode.
It is configurable with several options. I am using currntly this:
(setq desktop-dirname "~/.emacs.d/desktop/"
Here's a package that shows recentf-open-files when starting Emacs without a file to open:
Configuration with use-package:
(setq recentf-max-menu-items 25)
You can customize recentf-menu-action, from C-h v recentf-menu-action:
recentf-menu-action is a variable defined in ‘recentf.el’. Its value
Documentation: Function to invoke with a filename item of the recentf
menu. The default is to call ‘find-file’ to edit the selected file.
the default value is find-file, so if you always want ...
I know this thread is old, but i came across the same problem in MS Windows (i.e. Windows does know how to exit Emacs daemon gracefully). I solved this for me by hooking recentf-save-list into terminal-delete-functions. So in my init file I have the following line:
(add-hook 'delete-terminal-functions (lambda (terminal) (recentf-save-list)))
Then the ...
Seems that I used deprecated way for activating minor mode (this works across Emacs 21-24):
(setq-default save-place t)
Today way to activate this minor mode is:
Thanks to Drew for hint!
You're looking for counsel-recentf, which comes with counsel.
Just M-x counsel-recentf or bind it to any keys you'd like and that's all you're looking for.
Loosely speaking Ivy is the completion backend, counsel provides functionality to use ivy "replacing" some popular commands with ivy-style completion.
Your problem/question about seeing only 5 recent files listed in the menu.
Customize option recentf-menu-open-all-flag to t.
The recentf menu then shows item All..., which lists all recent files, letting you open any of them individually.
Your question about opening all recent files at once. (Use C-x C-b to navigate to their buffers.)
Your question is a duplicate of that one. Thanks to that reference to a blog entry, I included
(setq recentf-max-menu-items 25)
(global-set-key "\C-x\ \C-r" 'recentf-open-files)
in my .emacs file.
I have this in my init file:
;; Bind C-k to kill buffer from `ivy-switch-buffer'
(defun mu-ivy-kill-buffer ()
(define-key ivy-switch-buffer-map (kbd "C-k") 'mu-ivy-kill-buffer)
Note that the latest release of ivy on MELPA, added a new binding C-c C-k which removes to buffer from ivy-switch-...