unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Sam Steingold <sds@gnu.org>, 37998@debbugs.gnu.org
Subject: bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
Date: Wed, 27 Nov 2019 23:28:22 +0200	[thread overview]
Message-ID: <87sgm98989.fsf@mail.linkov.net> (raw)
In-Reply-To: <87muchechg.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 27 Nov 2019 13:21:31 +0100")

[-- Attachment #1: Type: text/plain, Size: 189 bytes --]

>> 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):


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnus-tabs.patch --]
[-- Type: text/x-diff, Size: 2934 bytes --]

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

  reply	other threads:[~2019-11-27 21:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30 20:21 bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame Sam Steingold
2019-10-30 20:58 ` Lars Ingebrigtsen
2019-10-30 21:11   ` Sam Steingold
2019-11-17  9:53     ` Lars Ingebrigtsen
2019-11-21 22:22       ` Juri Linkov
2019-11-22 12:10         ` Lars Ingebrigtsen
2019-11-22 18:50           ` Sam Steingold
2019-11-23 23:11             ` Juri Linkov
2019-11-26 22:55           ` Juri Linkov
2019-11-27 12:21             ` Lars Ingebrigtsen
2019-11-27 21:28               ` Juri Linkov [this message]
2019-11-30 21:37                 ` Juri Linkov
2019-12-05  9:37                 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sgm98989.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=37998@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=sds@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).