From 5fd4be9f8577aaafb014aa9ced7ca1789afbdad2 Mon Sep 17 00:00:00 2001 From: contrapunctus Date: Mon, 31 Jan 2022 15:56:47 +0530 Subject: [PATCH] Move bookmark and recentf config to Completion Use bookmark's own autosave mechanism --- init.org | 59 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/init.org b/init.org index 9777471..8a3cc56 100644 --- a/init.org +++ b/init.org @@ -3463,6 +3463,35 @@ But with =initials=, the desired completion is often buried in the results. That ("C-M-r" . flex-isearch-backward)) #+END_SRC +** bookmarks +#+BEGIN_SRC emacs-lisp +(use-package bookmark + :config (setq bookmark-save-flag 1)) +#+END_SRC + +** recentf +#+BEGIN_SRC emacs-lisp +(use-package recentf + :init (recentf-mode 1) + :bind ("C-x C-r C-o" . recentf-open-files) + :config + (setq recentf-auto-cleanup 'never + recentf-max-menu-items 500 + recentf-max-saved-items 1000 + recentf-save-file (locate-user-emacs-file "recentf") + recentf-exclude '("\\.html\\(\\.orig\\)?$" + "\\.jpe?g$" + "\\.png$" + "\\.mp4$" + "\\.etc" + "\\.umstuff")) + ;; I'd rather run cleanup manually, if ever required; running this + ;; automatically is a recipe for periodically losing your recentf + ;; entries when your disk happens to be unmounted. + ;; :hook (kill-emacs . recentf-cleanup) + ) +#+END_SRC + * misc keybindings #+BEGIN_SRC emacs-lisp (global-set-key (kbd "M-w") 'kill-ring-save) @@ -5181,36 +5210,6 @@ Potentially useful - https://www.draketo.de/software/emacs-javascript.html :hook (js2-mode-hook . skewer-mode)) #+END_SRC -* bookmarks -#+BEGIN_SRC emacs-lisp -(use-package bookmark - :hook (kill-emacs . bookmark-save) - :config (run-with-idle-timer 3 t #'bookmark-save)) -#+END_SRC - -* recentf -#+BEGIN_SRC emacs-lisp -(use-package recentf - :init (recentf-mode 1) - :bind ("C-x C-r C-o" . recentf-open-files) - :config - (setq recentf-auto-cleanup 'never - recentf-max-menu-items 500 - recentf-max-saved-items 1000 - recentf-save-file (locate-user-emacs-file "recentf") - recentf-exclude '("\\.html\\(\\.orig\\)?$" - "\\.jpe?g$" - "\\.png$" - "\\.mp4$" - "\\.etc" - "\\.umstuff")) - ;; I'd rather run cleanup manually, if ever required; running this - ;; automatically is a recipe for periodically losing your recentf - ;; entries when your disk happens to be unmounted. - ;; :hook (kill-emacs . recentf-cleanup) - ) -#+END_SRC - text size change nicked from wasamasa's init - https://github.com/wasamasa/dotemacs/blob/934d0b37692d62fe9af56b52accac5bcd4445ae3/init.org