summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-01-02 17:36:49 -0600
committerCase Duckworth2021-01-02 17:36:49 -0600
commitc5735b3182e28e081513f8a0bd57f2df073faeda (patch)
tree1517e25d76c3db6da1bdda6df3e44e485bd450af
parentAdd which-key (diff)
downloademacs-c5735b3182e28e081513f8a0bd57f2df073faeda.tar.gz
emacs-c5735b3182e28e081513f8a0bd57f2df073faeda.zip
Whitespace
-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