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 ...
(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 $...
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.)
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)
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 ...
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.
This should do it.
(defun no-msg (function)
"Prevent FUNCTION from showing `Wrote <FILE>' messages.
\(The messages are still logged to `*Messages*'.)"
(let ((inhibit-message t))
(advice-add 'recentf-save-list :around 'no-msg)
To see the messages again, use (advice-remove 'recentf-save-list 'no-msg).
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!
Dired+ just uses your recentf-list of files and directories. It is library recentf.el that controls what file and dir names to record there.
For that, library recentf.el provides several user options, which filter out certain file and dir names, etc. That's no doubt what you're running into.
Your second question isn't clear to me (and you really should ...
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.)