emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master df89d6d: * lisp/gnus/gnus-win.el (gnus-configure-frame): Check fo


From: Juri Linkov
Subject: master df89d6d: * lisp/gnus/gnus-win.el (gnus-configure-frame): Check for window-live-p.
Date: Sat, 30 Nov 2019 16:36:59 -0500 (EST)

branch: master
commit df89d6d6dc429e638e425536d1c201b5373f2abd
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    * lisp/gnus/gnus-win.el (gnus-configure-frame): Check for window-live-p.
    
    * doc/misc/gnus.texi (Tabbed Interface): New node.  (bug#37998)
---
 doc/misc/gnus.texi    | 32 ++++++++++++++++++++++++++++++++
 lisp/gnus/gnus-win.el |  9 ++++++---
 2 files changed, 38 insertions(+), 3 deletions(-)

diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index e43aa92..d563d52 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -813,6 +813,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.
@@ -22189,6 +22190,7 @@ to you, using @kbd{G b u} and updating the group will 
usually fix this.
 * 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 @@ between summary buffer (top one-sixth) and article 
buffer (bottom).
 @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
diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el
index b39c9fa..81b3437 100644
--- a/lisp/gnus/gnus-win.el
+++ b/lisp/gnus/gnus-win.el
@@ -367,11 +367,14 @@ See the Gnus manual for an explanation of the syntax 
used.")
            (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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]