unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Bastian Beranek <bastian.beischer@gmail.com>
Cc: 46299@debbugs.gnu.org
Subject: bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames.
Date: Mon, 15 Feb 2021 19:01:17 +0200	[thread overview]
Message-ID: <87pn11z2n6.fsf@mail.linkov.net> (raw)
In-Reply-To: <87sg5xwskc.fsf@gmail.com> (Bastian Beranek's message of "Mon, 15 Feb 2021 11:09:39 +0100")

>> Before your patch, I did nothing with the enabled tab-bar,
>> but now it disables the tab-bar, and doesn't enable it again later,
>> because tab-bar-show is let-bound to nil.
>
> Could you please describe the desired behavior of tab-switcher in a few
> more words? I can't see anything wrong with it if I try it out here,

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.

> although I can sort of see what you're getting at: While the
> tab-swicher is active there should be no tab bar, and it should return
> when it is finished?

Maybe this could provide a nice visual effect, but the problem
is that it's not easy to detect the moment when it is finished.

I often use tab-switcher to create a new tab, and sometimes instead
of selecting an existing tab from the tab list, I change the mind
and switch to another buffer in the same new tab.

> What I see is that the tab-bar just stays on all the time, with a
> temporary tab for the tab-switcher itself. I have tab-bar-show
> customized to "1" here.

This is fine.

> Side question: Why does tab-switcher need to create a tab for its
> purpose? Doesn't it make more sense to use a regular buffer for that?

This is to emulate window switching feature that exists on most window managers:
all windows are unselected when the window switcher is activated.

>> A good solution would be to add a new choice value to tab-bar-show.
>> Something like 'do-not-change-tab-bar-lines', but shorter.
>> Then when let-bound, it should do nothing with the tab-bar-lines.
>
> Wouldn't it make more sense to have a different variable for that?
> Because tab-bar-show is a defcustom and we wouldn't want to expose this
> special value to users, right?

Exposing such value to users is fine, but anyway it seems there is
no need to add a new value or variable.

>> Also this is related to another problem:
>> What if the user wants to manually enable the tab bar on one frame only
>> without enabling tab-bar-mode?  Currently it's possible with
>>
>>   (add-hook 'after-make-frame-functions 'toggle-frame-tab-bar)
>>
>> But tab-bar--update-tab-bar-lines will disable it sooner or later.
>> Customizing to the same value like 'do-not-change-tab-bar-lines'
>> will solve this problem as well.
>
> That's true. I can see how tab-bar--update-tab-bar-lines can interfere
> with toggle-frame-tab-bar.
>
> But I think we would need a frame dependent variable to fix this. We
> can't use a global single variable, because toggle-frame-tab-bar is not
> supposed to change the behavior of tabs on other frames. I have to think
> about a good solution for a bit longer. Is attaching a new parameter to
> frames similiar to this a possibility?

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

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





  reply	other threads:[~2021-02-15 17:01 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 16:14 bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames Bastian Beischer
2021-02-05  8:54 ` Juri Linkov
2021-02-05 10:10   ` Bastian Beranek
2021-02-05 14:11     ` Bastian Beranek
2021-02-06 12:16       ` Bastian Beranek
2021-02-07 19:05         ` Juri Linkov
2021-02-07 23:03           ` Bastian Beranek
2021-02-08 17:50             ` Bastian Beranek
2021-02-08 18:19               ` Juri Linkov
2021-02-08 19:04                 ` Bastian Beranek
2021-02-09  8:00                   ` martin rudalics
2021-02-09  8:15                     ` Bastian Beranek
2021-02-09  8:58                       ` martin rudalics
2021-02-09  9:23                         ` Bastian Beranek
2021-02-09  9:45                           ` martin rudalics
2021-02-09 11:44                             ` Bastian Beranek
2021-02-09 17:32                               ` martin rudalics
2021-02-09 18:06                               ` Juri Linkov
2021-02-09 18:46                                 ` Bastian Beranek
2021-02-09 19:08                                   ` Eli Zaretskii
2021-02-09 19:01                                 ` Eli Zaretskii
2021-02-10 18:24                               ` Juri Linkov
2021-02-11 12:14                                 ` Bastian Beranek
2021-02-11 17:34                                   ` Bastian Beranek
2021-02-12  9:31                                   ` Juri Linkov
2021-02-12 10:24                                     ` Bastian Beranek
2021-02-12 14:47                                       ` Bastian Beranek
2021-02-12 19:23                                         ` Bastian Beranek
2021-02-13 18:23                                           ` Juri Linkov
2021-02-13 19:02                                             ` Bastian Beranek
2021-02-13 19:46                                               ` Juri Linkov
2021-02-14 18:44                                                 ` Juri Linkov
2021-02-15 10:05                                                   ` Bastian Beranek
2021-02-15 15:26                                                   ` Eli Zaretskii
2021-02-15 15:32                                                     ` Bastian Beranek
2021-02-15 15:53                                                       ` Eli Zaretskii
2021-02-16 10:40                                                         ` Bastian Beranek
2021-02-14 13:08                                             ` Bastian Beranek
2021-02-14 18:50                                               ` Juri Linkov
2021-02-14 19:28                                                 ` Juri Linkov
2021-02-15  8:16                                                 ` martin rudalics
2021-02-15  9:07                                                   ` Juri Linkov
2021-02-15 10:08                                                     ` martin rudalics
2021-02-15 10:12                                                   ` Bastian Beranek
2021-02-15 10:09                                                 ` Bastian Beranek
2021-02-15 17:01                                                   ` Juri Linkov [this message]
2021-02-15 22:10                                                     ` Bastian Beranek
2021-02-16  2:08                                                       ` bug#46299: [External] : " Drew Adams
2021-02-16 10:59                                                       ` Bastian Beranek
2021-02-16 15:31                                                         ` Bastian Beranek
2021-02-16 17:28                                                           ` Juri Linkov
2021-02-24 18:46                                                             ` Juri Linkov
2021-02-10 18:20                       ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pn11z2n6.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=46299@debbugs.gnu.org \
    --cc=bastian.beischer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).