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

Previous Next

Packages: emacs, gnus;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37998 in the body.
You can then email your comments to 37998 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#37998; Package emacs,gnus. (Wed, 30 Oct 2019 20:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to sds <at> gnu.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org. (Wed, 30 Oct 2019 20:22:02 GMT) Full text and rfc822 format available.

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

From: Sam Steingold <sds <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
Date: Wed, 30 Oct 2019 16:21:38 -0400
Gnus has gnus-other-frame.
Now that Emacs has tabs, it would be nice to be able to create a tab
dedicated to Gnus.

-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1671
http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com
http://www.memritv.org http://memri.org http://no2bds.org
He who laughs last thinks slowest.




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#37998; Package emacs,gnus. (Wed, 30 Oct 2019 20:59:03 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Sam Steingold <sds <at> gnu.org>
Cc: 37998 <at> debbugs.gnu.org
Subject: Re: bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
Date: Wed, 30 Oct 2019 21:58:50 +0100
Sam Steingold <sds <at> gnu.org> writes:

> Gnus has gnus-other-frame.
> Now that Emacs has tabs, it would be nice to be able to create a tab
> dedicated to Gnus.

Perhaps there should be a more general interface to say "run this
command in a new tab"?  Otherwise we'll end up with a huge bunch of new
foo-other-tab commands.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#37998; Package emacs,gnus. (Wed, 30 Oct 2019 21:12:02 GMT) Full text and rfc822 format available.

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

From: Sam Steingold <sds <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 37998 <at> debbugs.gnu.org
Subject: Re: bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
Date: Wed, 30 Oct 2019 17:11:21 -0400
> * Lars Ingebrigtsen <ynefv <at> tahf.bet> [2019-10-30 21:58:50 +0100]:
>
> Sam Steingold <sds <at> gnu.org> writes:
>
>> Gnus has gnus-other-frame.
>> Now that Emacs has tabs, it would be nice to be able to create a tab
>> dedicated to Gnus.
>
> Perhaps there should be a more general interface to say "run this
> command in a new tab"?  Otherwise we'll end up with a huge bunch of
> new foo-other-tab commands.

It is not so much "create a new tab and run gnus there" as the
bookkeeping of having a tab dedicated to gnus.

-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1671
http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com
http://www.memritv.org http://islamexposedonline.com http://camera.org
nobody's life, liberty or property are safe while the legislature is in session




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#37998; Package emacs,gnus. (Sun, 17 Nov 2019 09:55:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Sam Steingold <sds <at> gnu.org>
Cc: 37998 <at> debbugs.gnu.org
Subject: Re: bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
Date: Sun, 17 Nov 2019 10:53:54 +0100
Sam Steingold <sds <at> gnu.org> writes:

>> Perhaps there should be a more general interface to say "run this
>> command in a new tab"?  Otherwise we'll end up with a huge bunch of
>> new foo-other-tab commands.
>
> It is not so much "create a new tab and run gnus there" as the
> bookkeeping of having a tab dedicated to gnus.

But doesn't that go for all commands?  I guess Gnus is slightly special
in that it uses several windows, but...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Severity set to 'wishlist' from 'normal' Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 17 Nov 2019 09:55:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#37998; Package emacs,gnus. (Thu, 21 Nov 2019 23:05:02 GMT) Full text and rfc822 format available.

Message #19 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: Fri, 22 Nov 2019 00:22:07 +0200
>>> Perhaps there should be a more general interface to say "run this
>>> command in a new tab"?  Otherwise we'll end up with a huge bunch of
>>> new foo-other-tab commands.
>>
>> It is not so much "create a new tab and run gnus there" as the
>> bookkeeping of having a tab dedicated to gnus.
>
> But doesn't that go for all commands?  I guess Gnus is slightly special
> in that it uses several windows, but...

I'm not sure if a new command analogous to gnus-other-frame
is needed for tabs.  For a more general interface I believe
we have to rely on display-buffer-alist.

For example, I create a separate tab for each group and
for the group buffer.  Using display-buffer-alist the
rules could look like

  ("\\`\\*Group\\*\\'" .
   (display-buffer-in-tab
    (name . "Gnus")))

  ("\\`\\*Summary \\(.*\\)\\*\\'"
   . (display-buffer-in-tab
      (name . "Group \\1")))

So e.g. the command `M-x gnus RET' will create the tab with the name
"Gnus" automatically, or switch to the existing tab with the name "Gnus".
Opening a summary from the group buffer will either create a new tab
with the name deduced from the summary buffer name, or switch
to the existing tab by name.




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#37998; Package emacs,gnus. (Fri, 22 Nov 2019 12:11:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
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: Fri, 22 Nov 2019 13:10:31 +0100
Juri Linkov <juri <at> linkov.net> writes:

> For example, I create a separate tab for each group and
> for the group buffer.  Using display-buffer-alist the
> rules could look like
>
>   ("\\`\\*Group\\*\\'" .
>    (display-buffer-in-tab
>     (name . "Gnus")))
>
>   ("\\`\\*Summary \\(.*\\)\\*\\'"
>    . (display-buffer-in-tab
>       (name . "Group \\1")))
>
> So e.g. the command `M-x gnus RET' will create the tab with the name
> "Gnus" automatically, or switch to the existing tab with the name "Gnus".
> Opening a summary from the group buffer will either create a new tab
> with the name deduced from the summary buffer name, or switch
> to the existing tab by name.

Yes, that makes more sense than adding a new separate command, so I'm
closing this bug report.  But perhaps an example like this should be
added to the manual?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 22 Nov 2019 12:11:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 37998 <at> debbugs.gnu.org and sds <at> gnu.org Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 22 Nov 2019 12:11:05 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#37998; Package emacs,gnus. (Fri, 22 Nov 2019 18:51:01 GMT) Full text and rfc822 format available.

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

From: Sam Steingold <sds <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 37998 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
Date: Fri, 22 Nov 2019 13:50:00 -0500
> * Lars Ingebrigtsen <ynefv <at> tahf.bet> [2019-11-22 13:10:31 +0100]:
>
> Juri Linkov <juri <at> linkov.net> writes:
>
>>   ("\\`\\*Group\\*\\'" .
>>    (display-buffer-in-tab
>>     (name . "Gnus")))
>>
>>   ("\\`\\*Summary \\(.*\\)\\*\\'"
>>    . (display-buffer-in-tab
>>       (name . "Group \\1")))

Function `display-buffer-in-tab' is not defined.

> perhaps an example like this should be added to the manual?

+1


-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1671
http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com
http://americancensorship.org https://jihadwatch.org http://mideasttruth.com
Just because you're paranoid doesn't mean they AREN'T after you.




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#37998; Package emacs,gnus. (Sat, 23 Nov 2019 23:13:07 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Sam Steingold <sds <at> gnu.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 37998 <at> debbugs.gnu.org
Subject: Re: bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
Date: Sun, 24 Nov 2019 01:11:45 +0200
>>>   ("\\`\\*Group\\*\\'" .
>>>    (display-buffer-in-tab
>>>     (name . "Gnus")))
>>>
>>>   ("\\`\\*Summary \\(.*\\)\\*\\'"
>>>    . (display-buffer-in-tab
>>>       (name . "Group \\1")))
>
> Function `display-buffer-in-tab' is not defined.

Implementation is left as an exercise for the reader :)

>> perhaps an example like this should be added to the manual?
>
> +1

Ok, will add after implementing it in bug#38354.




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#37998; Package emacs,gnus. (Tue, 26 Nov 2019 22:58:01 GMT) Full text and rfc822 format available.

Message #35 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 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?




Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 26 Nov 2019 22:58:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#37998; Package emacs,gnus. (Wed, 27 Nov 2019 12:22:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
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 13:21:31 +0100
Juri Linkov <juri <at> linkov.net> writes:

> 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.

Hm, I see.  I haven't used tabs yet myself...

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

Possibly?  Could you suggest a patch?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#37998; Package emacs,gnus. (Wed, 27 Nov 2019 21:56:01 GMT) Full text and rfc822 format available.

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

Reply sent to Juri Linkov <juri <at> linkov.net>:
You have taken responsibility. (Sat, 30 Nov 2019 21:48:02 GMT) Full text and rfc822 format available.

Notification sent to sds <at> gnu.org:
bug acknowledged by developer. (Sat, 30 Nov 2019 21:48:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: 37998-done <at> debbugs.gnu.org
Subject: Re: bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
Date: Sat, 30 Nov 2019 23:37:08 +0200
>>> 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):

Installed and closed.




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#37998; Package emacs,gnus. (Thu, 05 Dec 2019 09:38:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
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: Thu, 05 Dec 2019 10:37:04 +0100
Juri Linkov <juri <at> linkov.net> writes:

> Maybe something like (together with documentation addition):

That looks good to me (I think), so go ahead and apply.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 02 Jan 2020 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 114 days ago.

Previous Next


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