[Top][All Lists]

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

Re: Tabs

From: Stefan Kangas
Subject: Re: Tabs
Date: Sun, 15 Sep 2019 18:44:39 +0200

Juri Linkov <address@hidden> writes:

> > (FWIW, I find the names tab-bar-mode and global-tab-line-mode
> > confusingly similar.  Could we find better and more descriptive names?
> >  For example, global-tab-line-mode could be global-buffer-tab-mode.)
> Actually it's more related to window than to buffer.  But
> global-window-tab-line-mode would be too long and not easy
> to type in e.g. M-x prompt.

What I'm trying to say is that I find the distinction between "tab
bar" and "tab line" confusing.  Of course, one could learn the
difference, but I think this will be somewhat frustrating for new
users.  Perhaps naming them something like "window tabs" and "buffer
tabs" would be more intuitive to also better explain what they are
used for.

> > For example, would feedback similar to "I think the width of the tabs
> > under tab-bar-mode should be fixed" be helpful?
> In browsers the width of each tab depends on the number of tabs
> to share tab-bar space proportionally between all tabs.  But we could
> add a numeric option for the fixed width.

In Firefox, the tab is set to a fixed maximum width when there is only
one tab.  When there are too many tabs, it shrinks them to fit them.
There is a minimum width, and once that is reached, Firefox adds
arrows to scroll left or right in the tab bar.  Perhaps we could do
something similar.

> >> 0. emacs -Q
> >> 1. M-x tab-bar-mode RET
> >> 2. Click on the plus sign to create a new tab
> >> 3. Click on the previous tab
> >> 4. Click on the close icon
> >
> > When saying M-x tab-bar-mode here, the window flickers as if redrawing
> > but no tabs show up.  The tabs do show up as soon as I resize the
> > window, or move it to a different workspace.  (My window manager is
> > XMonad, a tiling window manager, and the Emacs frame is automatically
> > set to full screen and moved to a particular workspace after launch.
> > Not sure if that helps.)

I've tested it a bit more, and in addition to the above, I've found
the following cases after running tab-bar-mode:

1. As described above: If I move it to another workspace where it is
the only full screen window, the tab bar will immediately show up.

2. However, I also have workspaces with window manager tabs.  If I
move it to one of these windows after saying M-x tab-bar-mode, I see
the tab bar painted *over* the buffer text.  I can move the point to
the line where the tab bar is painted, and moving the point around
will erase the tab bar and show the buffer text instead.  I've
attached two screenshots to demonstrate (1) before and (2) after
moving the point.  In 2, I moved to the top line in *scratch* and then
moved point to the right a bit.

(In this case too, if I resize the window, the buffer text will "pop
down" (below the tab bar) and the tab bar works as expected -- I can
no longer move point above the tab bar.)

3. I also get the same result (the tab bar painted over the buffer
text) if I put it as the sole window on a full screen workspace, say
M-x tab-bar-mode, and then switch to another workspace and back.

> Thanks, it seems this is an essential detail that might be specific
> to your window manager.  Do you see the same problem when saying
> M-x tool-bar-mode several times to turn the tool-bar on/off?

If I run tool-bar-mode after tab-bar-mode, the tab bar pops up.  If I
run tool-bar-mode to turn it on again, it stays visible.

Best regards,
Stefan Kangas

Attachment: tab-bar1.png
Description: PNG image

Attachment: tab-bar2.png
Description: PNG image

reply via email to

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