From 72f97be86f98c49e9cf6f3129f6fce37a5400617 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 21 Jul 2019 19:48:18 +0200 Subject: [PATCH] tools/magit: magit-save-repository-buffers = nil Autosaving our buffers can trigger unwanted side-effects, like save hooks and formatters, which is too magical. Instead, trust the user to know what they're doing. --- modules/tools/magit/config.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index 45f38b1d5..bccaa18ab 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -25,7 +25,11 @@ It is passed a user and repository name.") :config (setq transient-default-level 5 magit-revision-show-gravatars '("^Author: " . "^Commit: ") - magit-diff-refine-hunk t) ; show granular diffs in selected hunk + magit-diff-refine-hunk t ; show granular diffs in selected hunk + ;; Don't autosave repo buffers. This is too magical, and saving can + ;; trigger a bunch of unwanted side-effects, like save hooks and + ;; formatters. Trust us to know what we're doing. + magit-save-repository-buffers nil) ;; Magit uses `magit-display-buffer-traditional' to display windows, by ;; default, which is a little primitive. `+magit-display-buffer' marries