From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: Configuring tabs line format Date: Thu, 17 Oct 2019 00:40:44 +0200 Message-ID: <20191016224044.hqhevx5ds54lx7ek@Ergus> References: <874l08xrua.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="127062"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 Cc: TatriX , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 17 00:41:29 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 1iKryy-000WwY-Ck for ged-emacs-devel@m.gmane.org; Thu, 17 Oct 2019 00:41:28 +0200 Original-Received: from localhost ([::1]:48934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKryx-0004IX-5Z for ged-emacs-devel@m.gmane.org; Wed, 16 Oct 2019 18:41:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56304) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKryd-0004EL-1E for emacs-devel@gnu.org; Wed, 16 Oct 2019 18:41:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKryb-0007kM-3T for emacs-devel@gnu.org; Wed, 16 Oct 2019 18:41:06 -0400 Original-Received: from sonic306-21.consmr.mail.ir2.yahoo.com ([77.238.176.207]:37934) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iKrya-0007jq-J3 for emacs-devel@gnu.org; Wed, 16 Oct 2019 18:41:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1571265662; bh=VYkmLOQQxCXXTESJWdopOMYDIzeO1F3YkwunaaMqr0k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=eVjUtmJ9xopnWQvXM96P3At/Hx4OxVUdKT1JZKe2LAl8GhCssMSuE3ROI9mqVvGUN9lyP1jtmoYKhyY9aTzLiuxNKOnyVZ/1h7mk/1qzO37p9Hm+dwHdUslJhtncvph4pq4gCpSjqTIR9lop+Dbz57Nn5IhVh00TKFV6C1HTaTrQm9yxVD/OziSYAKnLZwvRXCBSN+kSZ5KnrTOkTdPATMZtenD3c2C1CjfLtNMUCZPoFdLQBks5qu1UrY5tuaNT2DBZE3VGgizmUg64LNo7sRtFrppzjeXcnUpZBYd3AIbuxNffzx7/HLCQcn7R/8dQvJluphuYobho83SuOuR8RA== X-YMail-OSG: J52s4lgVM1mbasAHp_CUxL7Fn1GaMad775.Ir_63sjbDYRU3lg8YrKRqUJUfzXB 5H0A0YIRpkq7ocWGOd3xUgq2fPJmlQX1UKeSnMq4AXOUku.DWRRHqn2Hofv1Moz1joKrqvHw8Kie Af8BeImpGECn1GYg0c.NMoWsc0hE7wfhfUZW5sqSkJA63LTfrsQVBwDLYdXLkw77vkQRtLe8hFX8 nXwkfCBiwT82SFs_fL4_U31DjL9IsT3z7tGxeUJcwL7dqMMOWc2kGEKXd5lvEFWICgcUC9_qP3N8 BeOKV1rXZpyhKpCKFuj995MaI6tgDyEZUSeXUKz42_cgJ2yFcIPv13h1sbCQr9L9ZYTEKTR0ka0f JLuzVJcKSAsRZFvSfFjEko9Ehv4rl_CoFWWC6ZlS5oMLb58gPp1WZopxYNmBRbZw2vNB24DMX789 MrAKY..9sii8BnNQ9YYYrhcP5tvDFqq5JffPCAlV0cZ4_68ihg5WDzoSwEub41Qk7UiIYV1btCvo Ee8Rjye7WkKgXvEFn19pz1bOSsrtu.gUtdba49Xk9cmRSwSi1A5AWC9SCz7iGfvSh1Nrs8iQKapS 8LwPTMu48OONe.0N_q8CGAOMhVOUMifMnQTEbSRdxZ3Gn1msSSXfbLcWItJWhVqBV.MtlriUCuPD MunYpdnB_TT.8fk5VQ7__1huyyejarIJ1IOKimbsADy6lHyK4vTV_sXAjQnExb_kq9m6.FIvHxTU ZQmLA9odjyT.qEmF6OkIoQwx9ZkzZPbihYQ9dQY2ktiiRd_cKBkTtjxE.MHq7UMx6Al3t8p2ldd4 gPYmfak7QTkXeMy6UFImIgzg.LnRflKbiE31jNh1Ph Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ir2.yahoo.com with HTTP; Wed, 16 Oct 2019 22:41:02 +0000 Original-Received: by smtp422.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 867fa468ab60900ca2db01abc3a92876; Wed, 16 Oct 2019 22:40:59 +0000 (UTC) Content-Disposition: inline In-Reply-To: <874l08xrua.fsf@mail.linkov.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 77.238.176.207 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:241103 Archived-At: Hi Juri: Some of the recent changes made the tab-bar not to work for me either in tui or gui. emacs -Q C-x 6 f file RET and there is not tab at all. In the gtk interface it shows nothing and with -nw it adds an extra row where before was the tab-bar. I have not follow the tab thread recently, does something changed that requires special intervention? On Thu, Oct 17, 2019 at 01:12:29AM +0300, Juri Linkov wrote: >> Is it possible to change how tab-bar is formatted? >> For example I'd like to put display-time-string there. > >Yes, everything is possible. You need just a few lines of code: > >(advice-add 'tab-bar-make-keymap-1 :around > (lambda (orig-fun) > (append `(keymap (display-time menu-item ,(format-time-string "%H:%M") ignore)) > (cdr (funcall orig-fun)))) > '((name . tab-bar-display-time))) > >and if you want also a timer to redraw the tab-bar during idle times. > >This has one problem - the clock is located on the left side. When >Android moved the status bar clock from the right corner to the left, >it caused backward-compatibility problems for millions of users, and >still it's impossible to move the clock back to the right on Android. > >But in Emacs everything is extensible and customizable. So it's easy >to move the clock to the right on the tab-bar with another few lines: > >(advice-add 'tab-bar-make-keymap-1 :around > (lambda (orig-fun) > (append (funcall orig-fun) > `((display-time menu-item > ,(concat > (propertize " " 'display '(space :align-to (- right 5))) > (format-time-string "%H:%M")) > ignore)))) > '((name . tab-bar-display-time))) > >Now the tab-bar clock looks exactly like the desktop top panel clock: >