aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.emacs.d/init.el7
-rw-r--r--.emacs.d/rul-emacs.org7
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.
nihil fit ex nihilo