[Top][All Lists]

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

Re: Tabs

From: Juri Linkov
Subject: Re: Tabs
Date: Mon, 16 Sep 2019 00:17:13 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

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

The name "tab bar" resembles frame-local "tool bar" and "menu bar",
whereas "tab line" evokes associations with window-local "header line"
and "mode line".

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

"buffer tabs" is a wrong name.  Actually there are "frame tab bar"
and "window tab line".  But adding more prefixes "frame-tab-bar-"
and "window-tab-line-" would add more inconvenience, especially
in completion.  Currently it's easy to complete "tab-" <TAB>
then continue either with "bar-" or "line-".  Using "frame-"
and "window-" prefixes for tabs would add more confusion with
frame and window commands.

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

I agree.  Is the maximum width measured in pixels or characters?

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

Have you had similar problems in the past with this window manager
and other Emacs components like menus, tool bars, scroll bars?
This might help to debug peculiarities of your window manager.

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

You mean first running of tool-bar-mode disables it?  So the tab bar
pops up and takes place previously used by tool-bar? This means there
is no such problem with tool-bar?

reply via email to

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