* bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
@ 2019-10-30 20:21 Sam Steingold
2019-10-30 20:58 ` Lars Ingebrigtsen
0 siblings, 1 reply; 13+ messages in thread
From: Sam Steingold @ 2019-10-30 20:21 UTC (permalink / raw)
To: 37998
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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
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
0 siblings, 1 reply; 13+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-30 20:58 UTC (permalink / raw)
To: Sam Steingold; +Cc: 37998
Sam Steingold <sds@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
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
2019-10-30 20:58 ` Lars Ingebrigtsen
@ 2019-10-30 21:11 ` Sam Steingold
2019-11-17 9:53 ` Lars Ingebrigtsen
0 siblings, 1 reply; 13+ messages in thread
From: Sam Steingold @ 2019-10-30 21:11 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 37998
> * Lars Ingebrigtsen <ynefv@tahf.bet> [2019-10-30 21:58:50 +0100]:
>
> Sam Steingold <sds@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
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
2019-10-30 21:11 ` Sam Steingold
@ 2019-11-17 9:53 ` Lars Ingebrigtsen
2019-11-21 22:22 ` Juri Linkov
0 siblings, 1 reply; 13+ messages in thread
From: Lars Ingebrigtsen @ 2019-11-17 9:53 UTC (permalink / raw)
To: Sam Steingold; +Cc: 37998
Sam Steingold <sds@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
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
2019-11-17 9:53 ` Lars Ingebrigtsen
@ 2019-11-21 22:22 ` Juri Linkov
2019-11-22 12:10 ` Lars Ingebrigtsen
0 siblings, 1 reply; 13+ messages in thread
From: Juri Linkov @ 2019-11-21 22:22 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Sam Steingold, 37998
>>> 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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
2019-11-21 22:22 ` Juri Linkov
@ 2019-11-22 12:10 ` Lars Ingebrigtsen
2019-11-22 18:50 ` Sam Steingold
2019-11-26 22:55 ` Juri Linkov
0 siblings, 2 replies; 13+ messages in thread
From: Lars Ingebrigtsen @ 2019-11-22 12:10 UTC (permalink / raw)
To: Juri Linkov; +Cc: Sam Steingold, 37998
Juri Linkov <juri@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
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
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
1 sibling, 1 reply; 13+ messages in thread
From: Sam Steingold @ 2019-11-22 18:50 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Juri Linkov, 37998
> * Lars Ingebrigtsen <ynefv@tahf.bet> [2019-11-22 13:10:31 +0100]:
>
> Juri Linkov <juri@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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
2019-11-22 18:50 ` Sam Steingold
@ 2019-11-23 23:11 ` Juri Linkov
0 siblings, 0 replies; 13+ messages in thread
From: Juri Linkov @ 2019-11-23 23:11 UTC (permalink / raw)
To: Sam Steingold; +Cc: Lars Ingebrigtsen, 37998
>>> ("\\`\\*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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
2019-11-22 12:10 ` Lars Ingebrigtsen
2019-11-22 18:50 ` Sam Steingold
@ 2019-11-26 22:55 ` Juri Linkov
2019-11-27 12:21 ` Lars Ingebrigtsen
1 sibling, 1 reply; 13+ messages in thread
From: Juri Linkov @ 2019-11-26 22:55 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Sam Steingold, 37998
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?
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
2019-11-26 22:55 ` Juri Linkov
@ 2019-11-27 12:21 ` Lars Ingebrigtsen
2019-11-27 21:28 ` Juri Linkov
0 siblings, 1 reply; 13+ messages in thread
From: Lars Ingebrigtsen @ 2019-11-27 12:21 UTC (permalink / raw)
To: Juri Linkov; +Cc: Sam Steingold, 37998
Juri Linkov <juri@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
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#37998: 27.0.50; gnus RFE: gnus-other-tab a la gnus-other-frame
2019-11-27 12:21 ` Lars Ingebrigtsen
@ 2019-11-27 21:28 ` Juri Linkov
2019-11-30 21:37 ` Juri Linkov
2019-12-05 9:37 ` Lars Ingebrigtsen
0 siblings, 2 replies; 13+ messages in thread
From: Juri Linkov @ 2019-11-27 21:28 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Sam Steingold, 37998
[-- 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
^ permalink raw reply related [flat|nested] 13+ messages in thread
end of thread, other threads:[~2019-12-05 9:37 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2019-11-30 21:37 ` Juri Linkov
2019-12-05 9:37 ` Lars Ingebrigtsen
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).