From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.help Subject: Re: Help customising the behaviour of the new Tab Line mode Date: Mon, 17 Aug 2020 03:33:36 +0300 Organization: LINKOV.NET Message-ID: <878seeys27.fsf@mail.linkov.net> References: <005b781b-a6e0-e1b8-bf2e-090c67de16ac.ref@yahoo.de> <005b781b-a6e0-e1b8-bf2e-090c67de16ac@yahoo.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31056"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Help Gnu Emacs mailing list To: "R. Diez" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 18 03:36:17 2020 Return-path: Envelope-to: geh-help-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 1k7qXx-0007wP-AL for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 18 Aug 2020 03:36:17 +0200 Original-Received: from localhost ([::1]:42088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k7qXw-0008Dt-AY for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 17 Aug 2020 21:36:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k7qFf-0003u6-TE for help-gnu-emacs@gnu.org; Mon, 17 Aug 2020 21:17:23 -0400 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:48969) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k7qFd-0007jt-ST for help-gnu-emacs@gnu.org; Mon, 17 Aug 2020 21:17:23 -0400 X-Originating-IP: 91.129.102.47 Original-Received: from mail.gandi.net (m91-129-102-47.cust.tele2.ee [91.129.102.47]) (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 78EB2FF802; Tue, 18 Aug 2020 01:17:16 +0000 (UTC) In-Reply-To: <005b781b-a6e0-e1b8-bf2e-090c67de16ac@yahoo.de> (R. Diez's message of "Fri, 14 Aug 2020 15:34:29 +0200") Received-SPF: pass client-ip=217.70.183.199; envelope-from=juri@linkov.net; helo=relay9-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/17 21:17:18 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_24_48=1.34, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 17 Aug 2020 21:35:57 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:123705 Archived-At: > For example, I tend to have source.h to the left and source.cpp to the > right, so that I can quickly switch between them. I tend to keep all such > .h & .cpp files in pairs on the tab bar. > [...] > Issue 1) The first thing I noticed is that 'compile' creates > a window/pane/whatever for the compilation output, and the tab line at the > top does not show the compilation buffert. In fact, if I call > split-window-below, the tab line below only has the current buffer on > it. However, I would like all Tab Lines to show all buffers (or at least > all buffers visited in the whole frame). And I want all those buffers to > have the same tab order (because my positional memory is useful, but > limited). That would match the behaviour of the old tabbar.el package. How > do I achieve that? Please remember that my Lisp is rather limited. I can > tinker, but it won't be pretty. 8-) Please try this code: (defun tab-line-tabs-mode-sorted-buffers () "Return a list of buffers sorted by file name and file extension." (seq-sort-by #'buffer-name (lambda (a b) (cond ((equal (file-name-sans-extension a) (file-name-sans-extension b)) (string> (file-name-extension a) (file-name-extension b))) (t (string< a b)))) (seq-filter (lambda (b) (and (buffer-live-p b) (/= (aref (buffer-name b) 0) ?\s))) (buffer-list)))) (setq tab-line-tabs-function 'tab-line-tabs-mode-sorted-buffers) Does it sort tabs in the order that you prefer? It keeps .h & .cpp files in pairs where source.h is to the left and source.cpp to the right.