From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Tabs Date: Sun, 06 Oct 2019 01:12:07 +0300 Organization: LINKOV.NET Message-ID: <87imp2vns4.fsf@mail.linkov.net> References: <87a7bpysm8.fsf@mail.linkov.net> <875zlnu9ds.fsf@web.de> <87blvdxpr0.fsf@mail.linkov.net> <878sqhtbm3.fsf@web.de> <87v9tgnndn.fsf@mail.linkov.net> <87h84npa5e.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="131669"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 06 00:29:20 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iGsYB-000Y8J-Dc for ged-emacs-devel@m.gmane.org; Sun, 06 Oct 2019 00:29:19 +0200 Original-Received: from localhost ([::1]:59248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGsY9-0008Ut-VY for ged-emacs-devel@m.gmane.org; Sat, 05 Oct 2019 18:29:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49925) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGsRc-0001pJ-JX for emacs-devel@gnu.org; Sat, 05 Oct 2019 18:22:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGsRY-0006x0-Jr for emacs-devel@gnu.org; Sat, 05 Oct 2019 18:22:32 -0400 Original-Received: from eastern.birch.relay.mailchannels.net ([23.83.209.55]:61430) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iGsRY-0006ta-6H for emacs-devel@gnu.org; Sat, 05 Oct 2019 18:22:28 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id EBBEA600552; Sat, 5 Oct 2019 22:22:26 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a36.g.dreamhost.com (100-96-60-233.trex.outbound.svc.cluster.local [100.96.60.233]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 80C2D600186; Sat, 5 Oct 2019 22:22:26 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a36.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.3); Sat, 05 Oct 2019 22:22:26 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Interest-Chemical: 5d491b0b16ada965_1570314146766_379905350 X-MC-Loop-Signature: 1570314146766:1159309211 X-MC-Ingress-Time: 1570314146766 Original-Received: from pdx1-sub0-mail-a36.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a36.g.dreamhost.com (Postfix) with ESMTP id A82E78181A; Sat, 5 Oct 2019 15:22:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=kemn8ftKsljUQUXYpDtVVru60s4=; b= xfxhUPJe1Sc+QgBi24VTHNOgSUTMyMQm8vnb7NA15FrsOidYZRS6T3sCiHI6mBGG 4zx4+Y42HzHnb39DOffAb50xZFHZgdTB3Su4qNS6DUzFBEYt4JxpPaq7MOY4n0zb 9wpl3GHO+tsSzjJjYahtgARYbChvFUFoThnGjqioTfc= Original-Received: from mail.jurta.org (m91-129-99-99.cust.tele2.ee [91.129.99.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a36.g.dreamhost.com (Postfix) with ESMTPSA id A5E6281818; Sat, 5 Oct 2019 15:22:23 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a36 In-Reply-To: <87h84npa5e.fsf@web.de> (Michael Heerdegen's message of "Sat, 05 Oct 2019 15:57:49 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrheefgddujeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdelledrleelnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledrleelrdelledprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehmihgthhgrvghlpghhvggvrhguvghgvghnseifvggsrdguvgenucevlhhushhtvghrufhiiigvpedu X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.209.55 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240635 Archived-At: > What I didn't get working is to show tabs only for Info buffers and hide > it for all others. Whatever I tried tabs are either displayed in every > window or in none. > > This is what I have so far: > > #+begin_src emacs-lisp > (customize-set-variable 'tab-bar-show 1) > (setq-default tab-bar-tabs-function #'ignore) > (add-hook 'Info-mode-hook > (defun my-Info-mode-hook-configure-tab-bar () > (setq-local > tab-bar-tabs-function > (lambda () > (mapcan > (lambda (b) > (when (with-current-buffer b (derived-mode-p 'Info-mode)) > (list `(,(if (eq b (current-buffer)) 'current-tab 'tab) > (name . ,(buffer-name b)) > (binding . (lambda () (interactive) (switch-to-buffer ,b))) > (close-binding . (lambda () (interactive) (kill-buffer ,b) (force-mode-line-update))))))) > (buffer-list)))))) > #+end_src > > Can I get it work? I tried your code, and it works fine: tabs are shown only when the current buffer is in Info mode, and hidden when the selected window's buffer is in other modes.