mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
feat(lib): add doom/remove-recent-file
To interactively remove a file from your recentf list. (Perhaps similar could be added to embark for consult-recent-files?)
This commit is contained in:
@ -335,3 +335,13 @@ If FORCE-P, overwrite the destination file if it exists, without confirmation."
|
|||||||
(with-current-buffer origin
|
(with-current-buffer origin
|
||||||
(revert-buffer t t))))
|
(revert-buffer t t))))
|
||||||
(user-error "Unable to open %S" file))))
|
(user-error "Unable to open %S" file))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom/remove-recent-file (file)
|
||||||
|
"Remove FILE from your recently-opened-files list."
|
||||||
|
(interactive
|
||||||
|
(list (completing-read "Remove recent file: " recentf-list
|
||||||
|
nil t)))
|
||||||
|
(setq recentf-list (delete file recentf-list))
|
||||||
|
(recentf-save-list)
|
||||||
|
(message "Removed %S from `recentf-list'" (abbreviate-file-name file)))
|
||||||
|
Reference in New Issue
Block a user