From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: Tabs Date: Sat, 05 Oct 2019 15:57:49 +0200 Message-ID: <87h84npa5e.fsf@web.de> References: <87a7bpysm8.fsf@mail.linkov.net> <875zlnu9ds.fsf@web.de> <87blvdxpr0.fsf@mail.linkov.net> <878sqhtbm3.fsf@web.de> <87v9tgnndn.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="230699"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 05 15:58:38 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 1iGkZx-000xpt-Qa for ged-emacs-devel@m.gmane.org; Sat, 05 Oct 2019 15:58:37 +0200 Original-Received: from localhost ([::1]:56912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGkZv-0005AC-7f for ged-emacs-devel@m.gmane.org; Sat, 05 Oct 2019 09:58:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33890) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGkZH-00054r-CW for emacs-devel@gnu.org; Sat, 05 Oct 2019 09:57:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGkZG-0005da-46 for emacs-devel@gnu.org; Sat, 05 Oct 2019 09:57:55 -0400 Original-Received: from mout.web.de ([212.227.17.12]:40153) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iGkZF-0005d4-RX for emacs-devel@gnu.org; Sat, 05 Oct 2019 09:57:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1570283864; bh=BgsDwgaIr4KcV8mhGGxL+UrRtktGgPjVfinS0IoUGYs=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=OS3QDyqB/kZ55X4dOH75pAtpsxK1Q7IKWUmbPn/tz5d8VS8sCdxdYbvbAN80Sbdy8 WobG6C6oaRcuohbUivjn2AVMgjo0q7QOBf7JNZj1rU1XCgiuLcgteDkIucI3/JPYS0 s6tkTb7iAsGt9gSW9sZ8KsxfxtzW0GfqQEHnI20Y= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([94.218.185.16]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MGABv-1iN3xn1VmZ-00F9ho; Sat, 05 Oct 2019 15:57:44 +0200 In-Reply-To: <87v9tgnndn.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 25 Sep 2019 23:15:32 +0300") X-Provags-ID: V03:K1:72WdTwsEGtbVgEHmY3UJBcUXLiZDesDFgL+jhQM/70nhlpL1ob8 KkOQ8vcBWrbJ24Q4+Pt4/IDuo1pXbv47cnYhL4mrpjUxiNTc5yoO68qiCI/goTy75O2Qm34 WIDAVocT5nuw6Z07fUn/dGevrLg8DlJj5381tF2+gzqFW4JPc4lf8fiDOYdvKKvJeUn+c+v qUHHu4CiKuSqU2xRpXOTA== X-UI-Out-Filterresults: notjunk:1;V03:K0:EN+yIvzDUQE=:yF7qTAs06qUcMWKfI/V+Ir nTwbo02kmyyln4tif+cVVFQtYparqrf6cBnS/SZNvivXlXJOMDBs+7Qr5VJlqyztiYA/1cMgo GaOlJROZyoctfSZkU1Mzl6lda492v7hLonc62dMKhPas4MBYFP3/aZ1ieyipWCS4z+yDRbP3y DP3OKb1l5qs/ceCJe/ZV0k3HSDh8ImoOjQhGb3ZqVegplMxkT4vB6DgIRQd1/y+eIGB+pIQ8T j+kNt5N0xW1T6zVLZxeFtWuhRnTLYN8YaBf1DavnDwIPfhfrXGlmaMQwK7lfmIucOTcZRuHD9 P8cbLYbIfWAenkUkJtkKoi+oycRyfeXrvZw/RPegScsjFZc2EYHqkLAMUmnX9WOxYEhG/iU+6 0NkTp1o5+gfyhU9QVH6FehILVfJZVT0CYWKTJhkKtqii9UQJ3FOE2jMVpEG76FN8Tkqmc6KBE M794WhqHdVXXKoHh7gFHsSc0sC9U1wSUa3cFYqwIe5tfqeM5JJM8754cixET9mMr1eBhIGZa9 97tPATfXzFKWf6rUtyt5pmoW0fgH/93aFS2ND4sSbsWRcDMZ0VN27xUOp7laIAnb6UfOYqqvo NDVXK8nRE+7cpIOKsFLZSG7sGdlkQQlMMT5e8lQ/A7bz05utUeZHshfuco5FdRLYTEjTE+vUK mlmLFiD/t+yH2Kso+ugKISR5sRpWPh7qd4AULJMqi8KtAOXFqK0KbY66X8irt8ZevBMbl/xrM GrM1rtpJehTzL94NVOteMYY985xBhKfje+pdpkypEfKT9jihCufOlIWtGJXqq7rVZGcEFYQM X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.12 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:240613 Archived-At: Juri Linkov writes: > Now configuration is even simpler: > > (add-hook 'Info-mode-hook > (lambda () > (setq-local tab-line-tabs-function > (lambda () > (mapcan > (lambda (b) > (when (with-current-buffer b (derived-mode-p 'Info-mode)) > (list b))) > (buffer-list)))))) Works for me, thanks. 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? TIA, Michael.