GNU bug report logs - #37998
27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame

Previous Next

Packages: gnus, emacs;

Reported by: sds <at> gnu.org

Date: Wed, 30 Oct 2019 20:22:01 UTC

Severity: wishlist

Tags: wontfix

Found in version 27.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #43 received at 37998 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Sam Steingold <sds <at> gnu.org>, 37998 <at> debbugs.gnu.org
Subject: Re: bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
Date: Wed, 27 Nov 2019 23:28:22 +0200
[Message part 1 (text/plain, inline)]
>> Maybe gnus-configure-frame should check if an original window is
>> still alive?
>
> Possibly?  Could you suggest a patch?

Maybe something like (together with documentation addition):

[gnus-tabs.patch (text/x-diff, inline)]
diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el
index b39c9faab6..bcf90f1d55 100644
--- a/lisp/gnus/gnus-win.el
+++ b/lisp/gnus/gnus-win.el
@@ -367,11 +367,14 @@ gnus-configure-frame
 	    (setq result (or (gnus-configure-frame
 			      (car comp-subs) window)
 			     result))
-	    (select-window new-win)
-	    (setq window new-win)
+            (if (not (window-live-p new-win))
+                ;; pop-to-buffer might have deleted the original window
+                (setq window (selected-window))
+              (select-window new-win)
+	      (setq window new-win))
 	    (setq comp-subs (cdr comp-subs))))
 	;; Return the proper window, if any.
-	(when result
+	(when (window-live-p result)
 	  (select-window result)))))))
 
 (defvar gnus-frame-split-p nil)
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index e43aa92c99..d563d52d58 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -813,6 +813,7 @@ Top
 * Symbolic Prefixes::           How to supply some Gnus functions with options.
 * Formatting Variables::        You can specify what buffers should look like.
 * Window Layout::               Configuring the Gnus buffer windows.
+* Tabbed Interface::            Configuring the Gnus tabs.
 * Faces and Fonts::             How to change how faces look.
 * Mode Lines::                  Displaying information in the mode lines.
 * Highlighting and Menus::      Making buffers look all nice and cozy.
@@ -22189,6 +22190,7 @@ Various
 * Symbolic Prefixes::           How to supply some Gnus functions with options.
 * Formatting Variables::        You can specify what buffers should look like.
 * Window Layout::               Configuring the Gnus buffer windows.
+* Tabbed Interface::            Configuring the Gnus tabs.
 * Faces and Fonts::             How to change how faces look.
 * Mode Lines::                  Displaying information in the mode lines.
 * Highlighting and Menus::      Making buffers look all nice and cozy.
@@ -22985,6 +22987,36 @@ Window Layout
 @end itemize
 
 
+@node Tabbed Interface
+@section Tabbed Interface
+@cindex tabbed interface
+@cindex tabs
+
+Gnus supports display of different buffers in dedicated tabs
+that you can select using the tab bar.
+
+To open the group buffer in a new tab named @samp{Gnus}, use:
+
+@lisp
+(push '("\\`\\*Group\\*\\'" .
+        (display-buffer-in-tab
+         (name . "Gnus")))
+      display-buffer-alist)
+@end lisp
+
+To read every summary in a separate explicitly named tab, use:
+
+@lisp
+(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)
+@end lisp
+
+
 @node Faces and Fonts
 @section Faces and Fonts
 @cindex faces

This bug report was last modified 5 years and 256 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.