diff options
author | Raúl Benencia <id@rbenencia.name> | 2024-12-12 07:30:49 -0800 |
---|---|---|
committer | Raúl Benencia <id@rbenencia.name> | 2024-12-12 07:31:14 -0800 |
commit | 9900cf013511222e03aed453ba517c939d6f8cd3 (patch) | |
tree | 1239db139a63117ebc7dbd256c0321572f6ff9c7 /.emacs.d | |
parent | 3b7b57a0900e7e49e3fbc2520b0e6b01f4526be1 (diff) |
emacs: same-some-buffers diff option
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/init.el | 7 | ||||
-rw-r--r-- | .emacs.d/rul-emacs.org | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index acad923..a07d86f 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -52,6 +52,13 @@ (pixel-scroll-precision-mode 1) ; Precision scrolling + +;; Source: https://protesilaos.com/codelog/2024-12-11-emacs-diff-save-some-buffers/ +(add-to-list 'save-some-buffers-action-alist + (list "d" + (lambda (buffer) (diff-buffer-with-file (buffer-file-name buffer))) + "show diff between the buffer and its file")) + ;; Server (require 'server) (setq server-client-instructions nil) ; Keep it quiet when opening an ec diff --git a/.emacs.d/rul-emacs.org b/.emacs.d/rul-emacs.org index 5394b3e..8996900 100644 --- a/.emacs.d/rul-emacs.org +++ b/.emacs.d/rul-emacs.org @@ -157,6 +157,13 @@ General configurations related to text editing across all modes. (setq auto-save-no-message t) ; Do not print a message when auto-saving (pixel-scroll-precision-mode 1) ; Precision scrolling + + +;; Source: https://protesilaos.com/codelog/2024-12-11-emacs-diff-save-some-buffers/ +(add-to-list 'save-some-buffers-action-alist + (list "d" + (lambda (buffer) (diff-buffer-with-file (buffer-file-name buffer))) + "show diff between the buffer and its file")) #+end_src ** Emacs server I used to run Emacs as a systemd daemon, but it was not too deterministic as sometimes it would break. |