blob: fcb1539ab0d6048feed55c55ac8d34120ccea233 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
;; Time-stamp: <2024-07-07 13h44 BST (0fb87241)>
(defun revert-all-file-buffers ()
"Refresh all open file buffers without confirmation"
(interactive)
(dolist (buf (buffer-list))
(let ((filename (buffer-file-name buf)))
(when (and filename (not (buffer-modified-p buf)))
(if (file-readable-p filename)
(with-current-buffer buf (revert-buffer :ignore-auto :noconfirm :preserve-modes))
(let (kill-buffer-query-functions)
(kill-buffer buf)
(message "Killed non-existing/unreadable file bufffer: %s" filename))))))
(message "Finished reverting buffers containing unmodified files."))
(use-package project
:defer nil)
(use-package magit
:ensure t
:bind (("C-x g" . magit-status))
:config
(setq magit-process-find-password-functions '(magit-process-password-auth-source)))
|