From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastian Beranek Newsgroups: gmane.emacs.bugs Subject: bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames. Date: Fri, 5 Feb 2021 11:10:01 +0100 Message-ID: References: <871rdv4xog.fsf@gmail.com> <87k0rmnbqs.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2391"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46299@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 05 11:13:27 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l7y7B-0000Tv-Py for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Feb 2021 11:13:25 +0100 Original-Received: from localhost ([::1]:37914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7y7A-00020c-Pt for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Feb 2021 05:13:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7y4s-0007GH-Ck for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2021 05:11:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59598) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l7y4s-0005uy-1m for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2021 05:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l7y4r-00037m-SK for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2021 05:11:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bastian Beranek Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Feb 2021 10:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46299 X-GNU-PR-Package: emacs Original-Received: via spool by 46299-submit@debbugs.gnu.org id=B46299.161251982911971 (code B ref 46299); Fri, 05 Feb 2021 10:11:01 +0000 Original-Received: (at 46299) by debbugs.gnu.org; 5 Feb 2021 10:10:29 +0000 Original-Received: from localhost ([127.0.0.1]:42911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7y4K-00036y-67 for submit@debbugs.gnu.org; Fri, 05 Feb 2021 05:10:29 -0500 Original-Received: from mail-qt1-f179.google.com ([209.85.160.179]:34741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7y4E-00036i-Rc for 46299@debbugs.gnu.org; Fri, 05 Feb 2021 05:10:26 -0500 Original-Received: by mail-qt1-f179.google.com with SMTP id c1so4590774qtc.1 for <46299@debbugs.gnu.org>; Fri, 05 Feb 2021 02:10:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zvLUPhVckzm7fcrkOPhfvxIgyibWksw4NF8pSFOB1oY=; b=JNwY4QpEFqqIYl8Zu0m5Bt6OXPc60ePHFvaVwBZgx+HgPc+FjE7D4Wt1zDnH0yxB95 ZMc8bAC6L+xxxJ4gkEaHr8Er6t7FdyxDYvZ4z5rHq97ki4tY8AFwlsRM/iSj5SZCp/0D 7Q7X8k7Wv3v/zfffcVsCQIS6QvXHAGrxif1lL/hn0pTlMBVvBBh8IeK4HR6h8vkLkHCH c3GajKE4LyEvInfcS99Tw8M9f2CDGgddv0jG4fnIcG/aOLSK7WVMqXaU+t7y8dW8UtEN InoyLI0DRFT/ekd6Hwkn2BXvHdOZdstvnTgNqz32on+efGsqlZRsyg7QoAGzDGpwlnFq Mpdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zvLUPhVckzm7fcrkOPhfvxIgyibWksw4NF8pSFOB1oY=; b=g/BDghBIOMc1Ai7JOw1QrWoFVs4wliVfD6kcb6CjnNwd7YZgzhyDP7ywZ+78q++AgF BIC+YVL+O6z0/sDbkBFo8TsiggMCvlHmR+NGBhuEE7xGoEQUxcisAos/yh65ICz8Bm0n N33ir/+WeBLWafOEIrlb1L05L5qQ12DOsPGfJYfo/zqvM9O1qxGY+ndIvNbrH8NyzXUt m74Y/V3KeDYoAXLI4nlux4ZJTokTqcQwdE3VjloyqiunpTOPZ/JRif3xoLsIRJsusjna 0GJNe/DYBPs2CNpUKdojMv501Aq5Oup8onvLroI1fy87ZWwWXpNw28FHamCST6N8/qZK 3JOA== X-Gm-Message-State: AOAM533E6fMvZPuDSOwrTVg4bfgAcwBMl4rj4q3H3Vk5M/Y3ON1cNaQ4 TttfuqUfoGKn7miHthZZEbMuyls1KAYM479VlVlXwO3lOzGTvg== X-Google-Smtp-Source: ABdhPJxO6zKwUm+enyb5DhVmem6bnvZTn4r9RX/vx+khohTNyr18dCZygyFIuSrwTRGE2I3sNLBaqVEJNhz8HgBrD2s= X-Received: by 2002:ac8:698a:: with SMTP id o10mr3447248qtq.242.1612519817080; Fri, 05 Feb 2021 02:10:17 -0800 (PST) In-Reply-To: <87k0rmnbqs.fsf@mail.linkov.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199353 Archived-At: Hey Juri, On Fri, Feb 5, 2021 at 10:22 AM Juri Linkov wrote: > > > I noticed that with the latest master branch setting tab-bar-show > > to "1" does not work work for new frames. On those the tabs are shown > > even if tab-bar-show is set to 1. > > Thanks for finding a case that is still unhandled. > > > I suppose a hook is needed which applies the correct setting > > to the new frame? > > Generally, Emacs core packages should avoid adding own code > to hooks, because hooks are intended mostly for users, such as > for example, configuring to enable tab-bar selectively: > > (add-hook 'after-make-frame-functions 'toggle-frame-tab-bar) > > Fortunately, frames provide a better way to set their default values > with default-frame-alist, that tab-bar-mode already modifies. Oh I see. Yes that would also work. Although I would say that in general it should be more robust to have a dynamic function which counts the numbers of tabs and adapts the number of tab-bar-lines according to the value of tab-bar show. Is it guaranteed that new frames only have one tab? > So doing something similar fixes the problem: That patch looks fine, except that my bug report translates equally to the case when tab-bar-show is nil, so (eq val 1) should be adapted to catch both "1" and "nil". Thanks for your help! Bastian