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: Wed, 25 Sep 2019 23:15:32 +0300 Organization: LINKOV.NET Message-ID: <87v9tgnndn.fsf@mail.linkov.net> References: <87a7bpysm8.fsf@mail.linkov.net> <875zlnu9ds.fsf@web.de> <87blvdxpr0.fsf@mail.linkov.net> <878sqhtbm3.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="256370"; 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 Wed Sep 25 22:37:32 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 1iDE2V-0014SZ-UN for ged-emacs-devel@m.gmane.org; Wed, 25 Sep 2019 22:37:32 +0200 Original-Received: from localhost ([::1]:57158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDE2Q-0001G9-Eh for ged-emacs-devel@m.gmane.org; Wed, 25 Sep 2019 16:37:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42574) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDDwz-0004Cz-HF for emacs-devel@gnu.org; Wed, 25 Sep 2019 16:31:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDDww-0007hs-Di for emacs-devel@gnu.org; Wed, 25 Sep 2019 16:31:48 -0400 Original-Received: from crocodile.birch.relay.mailchannels.net ([23.83.209.45]:41574) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iDDwr-0007Zy-Ff for emacs-devel@gnu.org; Wed, 25 Sep 2019 16:31:43 -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 9255F5E240F; Wed, 25 Sep 2019 20:31:33 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a19.g.dreamhost.com (100-96-35-93.trex.outbound.svc.cluster.local [100.96.35.93]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 0EAF55E2606; Wed, 25 Sep 2019 20:31:33 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a19.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.17.5); Wed, 25 Sep 2019 20:31:33 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Versed-Bottle: 5386bc9b033d8732_1569443493339_2009088580 X-MC-Loop-Signature: 1569443493339:3379896878 X-MC-Ingress-Time: 1569443493339 Original-Received: from pdx1-sub0-mail-a19.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a19.g.dreamhost.com (Postfix) with ESMTP id 974FF818D5; Wed, 25 Sep 2019 13:31:28 -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=/qdOs1i9hTnER0fwVEjQOxOMMt4=; b= PS2vC0QSUAT+MwO/CHhz3KXos/b9mJZOJ5is3ks0jjV0qvj0EMIP73TMnCerE7fs QwS9lGoSjLLd4X870Bn9s4ior8126kuf7x+NujIwoguY6gq4QBhu6aHfhoJ5IFfP PLAtH6bpZtw0DrcOrDknT6n987jU0POGxKnjRzlX5yo= Original-Received: from mail.jurta.org (m91-129-105-145.cust.tele2.ee [91.129.105.145]) (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-a19.g.dreamhost.com (Postfix) with ESMTPSA id F21F7818CB; Wed, 25 Sep 2019 13:31:26 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a19 In-Reply-To: <878sqhtbm3.fsf@web.de> (Michael Heerdegen's message of "Sun, 22 Sep 2019 02:31:48 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrfedvgdduheduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrddugeehnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedrudeghedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehmihgthhgrvghlpghhvggvrhguvghgvghnseifvggsrdguvgenucevlhhushhtvghrufhiiigvpedt X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 23.83.209.45 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:240293 Archived-At: >> The current implementation is already flexible enough, so for example, >> what you asked for *info* buffers, is possible to do with the current >> implementation with just a few lines: >> >> (advice-add 'tab-line-tabs :around >> (lambda (orig-fun &optional window) >> (if (derived-mode-p 'Info-mode) >> (mapcan (lambda (b) >> (with-current-buffer b >> (when (derived-mode-p 'Info-mode) >> (list b)))) >> (buffer-list)) >> (funcall orig-fun window)))) > > This seems exactly what I imagined - sounds very promising. 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)))))) And you can even use the tab-bar as well for the same purpose (if you don't need to switch window configurations): (add-hook 'Info-mode-hook (lambda () (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)))))) > Looking forward for it to appear in master. After thorough testing and improving customization the work on the branch is finished, and it is mostly ready for merge, but writing documentation is the most time-consuming process. I hope to finish writing documentation by the weekend.