From fdbf912e066dae12b2a22d307436be36a09641b3 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Tue, 13 Dec 2022 23:50:38 +0200 Subject: [PATCH] mu4e-view: use kill-buffer-and-window for quitting That restores the classic mu4e style. I.e., With default settings, e.g. case 1: - (1)go to inbox -> (2)see headers -> (3)open message -> window splits -> (4)read message -> (5)'q' . Window closes and we're back to (2). All good! The more complicated step is case 2: (4) read message -> (5) reply to message -> (6) done replying -> back to (4) but for some reason when pressing 'q' now, the window is not closed, but replaced by the headers window (so we have 2 now. [ I think it should behave just like in case 1 ] This fixes that. --- mu4e/mu4e-view.el | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/mu4e/mu4e-view.el b/mu4e/mu4e-view.el index 95f6068c..3052330d 100644 --- a/mu4e/mu4e-view.el +++ b/mu4e/mu4e-view.el @@ -119,16 +119,6 @@ specified a function as viewer." -;; Helpers - -(defun mu4e~view-quit-buffer () - "Quit the mu4e-view buffer. -This is a rather complex function, to ensure we don't disturb -other windows." - (interactive) - (quit-window t)) - - (defconst mu4e~view-raw-buffer-name " *mu4e-raw-view*" "Name for the raw message view buffer.") @@ -861,7 +851,7 @@ This is useful for advising some Gnus-functionality that does not work in mu4e." (define-key map (kbd "C-S-u") #'mu4e-update-mail-and-index) (define-key map (kbd "C-c C-u") #'mu4e-update-mail-and-index) - (define-key map "q" #'mu4e~view-quit-buffer) + (define-key map "q" #'kill-buffer-and-window) (define-key map "z" #'mu4e-view-detach) (define-key map "Z" #'mu4e-view-attach)