bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames.


From: Bastian Beranek
Subject: bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames.
Date: Mon, 15 Feb 2021 23:10:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Juri Linkov <juri@linkov.net> writes:

> Sorry, this failed in one of the previous versions of the patch,
> but works fine in the last version of your patch pushed to master.
> So there is no problem, sorry for false alarm.
>

Good. Thanks!

> Good idea.  Actually frame parameters could serve as a kind of
> "frame-local variables".
>

Right, that would be the idea. Is there precedent for this? It seems to
be the easiest way forward, but I don't know if this is considered
acceptable. Another option would be a global alist variable that maps
frames to the value.

>> Note that I'm not yet suggesting that we do it exactly as the above,
>> this has other issues - toggling twice does leave the do-not-change
>> frame parameter in place for example, so it's not the same as doing
>> nothing.
>
> Also toggling once should handle two cases:
>
> 1. while tab-bar-lines is enabled in all frames, it should disable
>    tab-bar-lines in the specified frame;
>
> 2. while tab-bar-lines is disabled in all frames, it should enable
>    tab-bar-lines in the specified frame.

That much is clear. The only question is what should happen if
tab-bar-show is 1 initially and then toggle-frame-tab-bar is used:

- If there is more than 1 tab, the tab-bar will be shown before. Then
  toggle-frame-tab-bar should disable it.

- If there is only 1 tab, the tab-bar will not be shown before. Then
  toggle-frame-tab-bar should enable it.

But how to go back? It seems that tab-bar-show should go back to "1" (in
order to make it a real toggle, i.e. it undoes itself). However, that
means that after the second toggle-frame-tab-bar the tab-bar will either
be shown or not, depending on the number of tabs opened at that specific
time. We have to consider that the user created or closed tabs in
between, so that means that there will be situations in which
toggle-frame-tab-bar does not really seem to do anything... For example:

- 1 tab (tab bar hidden)
- create tab -> 2 tabs (tab bar shown)
- toggle-frame-tab-bar (tab bar hidden)
- close tab (tab bar hidden)
- toggle-frame-tab-bar (tab bar still hidden, because only 1 tab)





reply via email to

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