Move bookmark and recentf config to Completion

Use bookmark's own autosave mechanism
This commit is contained in:
contrapunctus 2022-01-31 15:56:47 +05:30
parent 3021215afa
commit 5fd4be9f85
1 changed files with 29 additions and 30 deletions

View File

@ -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