Subject: gnus-summary-exit does not restore windows

From: [email-masked] (Juan José GarcíaRipoll)
Date: Sun, 15 Mar 2020 10:26:55 +0100

I have set Gnus with the following configuration excerpt

(use-package gnus
  ;; Arrange windows:
  ;; - Group list left window
  ;; - Summary first quarter of right window
  ;; - Article bottom 3/4 of right window
  (gnus-use-full-window nil)
  (gnus-kill-summary-on-exit t)
  (gnus-buffer-configuration
    '((group (horizontal 1.0 (group 1.0 point)))
      (summary (horizontal 1.0
                           (group 0.3)
                           (summary 1.0 point)))
      (article (horizontal 1.0
                           (vertical 0.3 (group 1.0))
                           (vertical 1.0  (summary 0.25 point)
                                          (article 1.0))))))
  )

The process is as follows
1. Open gnus
2. Move on top of a group and enter
3. The window is split horizontally, with a group buffer on the left and
a summary buffer on the right
4. Press 'q' to exit the summary buffer
5. The summary buffer is killed and replaced with a group buffer
6. Now I have two windows displaying the summary buffer

What should have happened
5. Gnus activates the 'group' window configuration
6. It then kills the summary buffer and I am left with one window
showing the groups

A workaround is to add
  :hook
  (gnus-summary-exit . (lambda () (gnus-configure-windows 'group 'force)))

A fix would be to reorder the code in gnus-summary-exit, so that the
code related to group windows is placed before the code related to
burying / deleting summary buffers.

Gnus v5.13
GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29

-- 
Juan José García Ripoll

Quantum Information and Foundations Group
Institute of Fundamental Physics IFF-CSIC
Calle Serrano 113b, Madrid 28006 Spain
http://quinfog.hbar.es - http://juanjose.garcia.ripoll