summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--config.org27
1 files changed, 16 insertions, 11 deletions
diff --git a/config.org b/config.org index add83bf..ab7ddea 100644 --- a/config.org +++ b/config.org
@@ -735,21 +735,26 @@ from [[https://www.reddit.com/r/emacs/comments/km9by4/weekly_tipstricketc_thread
735*** Recent files 735*** Recent files
736 736
737#+BEGIN_SRC emacs-lisp 737#+BEGIN_SRC emacs-lisp
738(require 'recentf) 738 (require 'recentf)
739 739
740(cuss recentf-max-menu-items 100 740 (cuss recentf-max-menu-items 100
741 "The maximum number of items in the recentf menu.") 741 "The maximum number of items in the recentf menu.")
742(cuss recentf-max-saved-items nil 742 (cuss recentf-max-saved-items nil
743 "Don't limit the number of recent files.") 743 "Don't limit the number of recent files.")
744 744
745(with-eval-after-load 'no-littering 745 (with-eval-after-load 'no-littering
746 (add-to-list 'recentf-exclude no-littering-var-directory) 746 (add-to-list 'recentf-exclude no-littering-var-directory)
747 (add-to-list 'recentf-exclude no-littering-etc-directory)) 747 (add-to-list 'recentf-exclude no-littering-etc-directory))
748
749 (recentf-mode +1)
748 750
749(recentf-mode +1) 751 ;; save recentf list when focusing away
752 (defun acdw/save-recentf-when-nonfocused ()
753 "Save `recentf-file' when out of focus."
754 (acdw/when-unfocused #'recentf-save-list))
750 755
751;; save the recentf-list every 5 minutes 756 (add-function :after after-focus-change-function
752(run-at-time nil (* 5 60) 'recentf-save-list) 757 #'acdw/save-recentf-when-nonfocused)
753#+END_SRC 758#+END_SRC
754 759
755** Undo 760** Undo