Subject: bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame

From: Juri Linkov <[email-masked]>
Date: Wed, 27 Nov 2019 00:55:56 +0200

reopen 37998
quit

Sorry, I have to reopen this.  In bug#38354 a new function
display-buffer-in-tab is implemented now, and works fine,
but it doesn't work only in Gnus.

For example, such customization

  (push '("\\`\\*Summary .*\\*\\'" .
          (display-buffer-in-tab
           (name . (lambda (buffer _alist)
                     (setq buffer (buffer-name buffer))
                     (when (string-match "\\`\\*Summary \\(.*\\)\\*\\'" buffer)
                       (format "Group %s" (match-string 1 buffer)))))))
        display-buffer-alist)

fails with the error

  Debugger entered--Lisp error: (wrong-type-argument window-live-p #<window 109>)
    select-window(#<window 109>)
    gnus-configure-frame((vertical 1.0 (summary 1.0 point)))
    gnus-configure-windows(summary)
    gnus-summary-read-group-1("nnml:list.emacs-devel" nil t nil nil nil)
    gnus-summary-read-group("nnml:list.emacs-devel" nil t nil nil nil nil)
    gnus-group-read-group(nil t)
    gnus-group-select-group(nil)
    funcall-interactively(gnus-group-select-group nil)
    call-interactively(gnus-group-select-group nil nil)
    command-execute(gnus-group-select-group)

This is because gnus-configure-frame expects an old window to be live,
but it's not, because tabs switch window-configurations in pop-to-buffer
using display-buffer-in-tab.

Maybe gnus-configure-frame should check if an original window is
still alive?