On 2010-06-13 14:32 +0100, Rémi Vanicat wrote:
> Which 5? I have *magit-tmp* that should be renamed " *magit-tmp*", and
> *magit-process*, but I see no other.

*magit-log* *magit-reflog*, log edit, wuzzup etc etc. I am thinking
 maybe 'q' in some of these buffers should just delete the buffer.

Locally I have the following two patches that delete the temp-buffers
and log-edit buffers after use. There seems to be no reason keeping them
around.

diff --git a/magit.el b/magit.el
index a9db09b..9f72d90 100644
--- a/magit.el
+++ b/magit.el
@@ -3193,8 +3193,7 @@ Prefix arg means justify as well."
                              (if commit-all '("--all") '())
                              (if amend '("--amend") '())
                              (if sign-off '("--signoff") '())))))))
-    (erase-buffer)
-    (bury-buffer)
+    (kill-buffer)
     (when (file-exists-p ".git/MERGE_MSG")
       (delete-file ".git/MERGE_MSG"))
     (magit-revert-buffers default-directory t)
@@ -3208,8 +3207,7 @@ Prefix arg means justify as well."
   (when (or (not magit-log-edit-confirm-cancellation)
            (yes-or-no-p
             "Really cancel editing the log (any changes will be lost)?"))
-    (erase-buffer)
-    (bury-buffer)
+    (kill-buffer)
     (when magit-pre-log-edit-window-configuration
       (set-window-configuration magit-pre-log-edit-window-configuration)
       (setq magit-pre-log-edit-window-configuration nil))))


        Modified magit.el
diff --git a/magit.el b/magit.el
index d7782d3..a9db09b 100644
--- a/magit.el
+++ b/magit.el
@@ -2167,7 +2167,8 @@ in the corresponding directories."
       (erase-buffer))
     (magit-insert-diff-item-patch diff "*magit-tmp*")
     (apply #'magit-run-git-with-input tmp
-          "apply" (append args (list "-")))))
+          "apply" (append args (list "-")))
+    (kill-buffer tmp)))
 
 (defun magit-apply-hunk-item* (hunk reverse &rest args)
   (when (zerop magit-diff-context-lines)
@@ -2180,7 +2181,8 @@ in the corresponding directories."
         hunk reverse (region-beginning) (region-end) tmp)
       (magit-insert-hunk-item-patch hunk tmp))
     (apply #'magit-run-git-with-input tmp
-          "apply" (append args (list "-")))))
+          "apply" (append args (list "-")))
+    (kill-buffer tmp)))
 
 (defun magit-apply-hunk-item (hunk &rest args)
   (apply #'magit-apply-hunk-item* hunk nil args))


Leo

Reply via email to