From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#39649: 27.0.60; tab-line doesn't scroll Date: Sat, 29 Feb 2020 23:44:56 +0200 Organization: LINKOV.NET Message-ID: <87blphrulz.fsf@mail.linkov.net> References: <87lfp0lsun.fsf@mail.linkov.net> <87imk3a5sa.fsf@mail.linkov.net> <87h7zn4d99.fsf@mail.linkov.net> <87r1yoopgp.fsf@mail.linkov.net> <87d0a8bu5c.fsf@gmail.com> <87y2sup4c2.fsf@mail.linkov.net> <87h7zg7vjx.fsf@mail.linkov.net> <87pne2ilur.fsf@mail.linkov.net> <871rqhj5x2.fsf@mail.linkov.net> <87imjshqkz.fsf@mail.linkov.net> <8336avgjn4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="78672"; 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: 39649@debbugs.gnu.org, joca.bt@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 29 22:52:32 2020 Return-path: Envelope-to: geb-bug-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 1j8A2B-000KNf-TR for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 Feb 2020 22:52:32 +0100 Original-Received: from localhost ([::1]:36176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8A2A-0006Jm-W3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 Feb 2020 16:52:31 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58191) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8A1k-0005ce-M1 for bug-gnu-emacs@gnu.org; Sat, 29 Feb 2020 16:52:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8A1j-0002Hi-Fs for bug-gnu-emacs@gnu.org; Sat, 29 Feb 2020 16:52:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57777) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j8A1j-0002Hb-CU for bug-gnu-emacs@gnu.org; Sat, 29 Feb 2020 16:52:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j8A1j-0000JV-Bw for bug-gnu-emacs@gnu.org; Sat, 29 Feb 2020 16:52:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Feb 2020 21:52:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39649 X-GNU-PR-Package: emacs Original-Received: via spool by 39649-submit@debbugs.gnu.org id=B39649.15830130991138 (code B ref 39649); Sat, 29 Feb 2020 21:52:03 +0000 Original-Received: (at 39649) by debbugs.gnu.org; 29 Feb 2020 21:51:39 +0000 Original-Received: from localhost ([127.0.0.1]:35512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8A1L-0000II-1C for submit@debbugs.gnu.org; Sat, 29 Feb 2020 16:51:39 -0500 Original-Received: from fossa.birch.relay.mailchannels.net ([23.83.209.62]:37372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8A1G-0000I0-TR for 39649@debbugs.gnu.org; Sat, 29 Feb 2020 16:51:35 -0500 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 C9FD4340BC3; Sat, 29 Feb 2020 21:51:33 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a73.g.dreamhost.com (100-96-0-15.trex.outbound.svc.cluster.local [100.96.0.15]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 647B3340B3D; Sat, 29 Feb 2020 21:51:33 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a73.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.5); Sat, 29 Feb 2020 21:51:33 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Cooing-Ski: 585243f037d248d5_1583013093645_380200335 X-MC-Loop-Signature: 1583013093645:2693743162 X-MC-Ingress-Time: 1583013093644 Original-Received: from pdx1-sub0-mail-a73.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a73.g.dreamhost.com (Postfix) with ESMTP id 03E737F539; Sat, 29 Feb 2020 13:51:33 -0800 (PST) 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:content-transfer-encoding; s=linkov.net; bh=fXdJul JtvcsUzqgykNm9wBPlz0w=; b=R+jWL0XTNCCrU8hR3/coJQ+yZOjHEpdLLtFMVS CB1l+zIo5NS+QKKBsTiuymRA69hnugXlH7sxoFbCP2kCPoKBDN30iG+lntY9hx/x prkaqCUFw56kMxtTUfymMiwVgK9qqelcWM3zKvPola1Zs1E700P4o/x+rYQ0YO7V 3DhOw= Original-Received: from mail.jurta.org (m91-129-103-27.cust.tele2.ee [91.129.103.27]) (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-a73.g.dreamhost.com (Postfix) with ESMTPSA id 010D27F52A; Sat, 29 Feb 2020 13:51:30 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a73 In-Reply-To: <8336avgjn4.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 28 Feb 2020 11:12:47 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedruddttddgudehjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtgfesthekredttderudenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrddvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtfedrvdejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepvghlihiisehgnhhurdhorhhg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:176702 Archived-At: > Why would we need that? The related display code is in C, so we never > needed to expose this to Lisp. format-mode-line already exposes it, but fails to properly handle its arg FACE. > I also don't understand the relation between this question and the > recipes you show. format-mode-line can be used to get the same formatted string as is displayed on the tab-line. >> The closest function is format-mode-line but still its formatting is >> different from what display_mode_element really displays in the >> tab-line. > > Why is that a problem? format-mode-line was not intended to be used > in display context. format-mode-line does the right thing for this task, but its handling of the arg FACE is broken. >> 1. emacs -Q >> 2. M-x global-tab-line-mode >> >> 3. C-x b test1 >> 4. M-: (insert (format-mode-line (tab-line-format))) >> 5. Note how the tab uses the face tab-line-tab >> with released-button box style, but the tab-line >> doesn't use the face tab-line > > I don't see tab-line-tab face, I see either tab-line-tab-inactive or > tab-line-tab-current. And the button style and its mouse-sensitive > behavior follows what I see on the real tab-line. This is correct, I meant tab-line-tab-inactive and tab-line-tab-current that inherit from tab-line-tab. > But maybe I don't understand what you allude to here. What is the > "tab" in this context, and what is "tab-line"? You have one inserted > into buffer text and one displayed on header-line-like tab-line -- > which one do you allude to here? And why do you think what is > displayed is some kind of problem? "tab-line" visually should have an appearance defined by the face "tab-li= ne", i.e. grey background that can be seen at whitespace between tabs, like in the case below. There is no problem here. The real problem is b= elow. >> 6. C-x b test2 >> 7. M-: (insert (format-mode-line (tab-line-format) 'tab-line)) >> 8. Note how the the tab-line now uses the face tab-line, >> but this face overrides the faces of individual tabs that >> should have the face tab-line-tab with released-button box style. > > And here I don't understand what you mean by "overrides". Do you see the same button styles with the faces tab-line-tab-inactive an= d tab-line-tab-current as in the case above like they are on the real tab-l= ine? These faces are lost when the arg FACE is specified. >> I can't find a function that would insert to the current buffer >> a string formatted exactly as the tab-line displayed >> above the window. > > Why is that needed? Actually, no other function needed. format-mode-line does it job, but doesn't handle its arg FACE correctly. No wonder that handling of its arg FACE is not yet implemented. I grepped the Emacs source code, and none of format-mode-line function calls uses the arg FACE. Jo=E3o said that everything already works, so this is not a problem for the Emacs 27 release. But in master format-mode-line could be fixed to implement better merging of its arg FACE with faces already existing on strings given in its arg FORMAT.