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: Mon, 02 Mar 2020 01:40:52 +0200 Organization: LINKOV.NET Message-ID: <87y2sjwsmz.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> <87blphrulz.fsf@mail.linkov.net> <83tv38yrzd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="61358"; 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 Mon Mar 02 00:44:15 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 1j8YFq-000Ft5-Q7 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Mar 2020 00:44:14 +0100 Original-Received: from localhost ([::1]:53244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8YFp-00006v-RX for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Mar 2020 18:44:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41041) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8YFh-0008W6-Ek for bug-gnu-emacs@gnu.org; Sun, 01 Mar 2020 18:44:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8YFd-00043D-VF for bug-gnu-emacs@gnu.org; Sun, 01 Mar 2020 18:44:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59344) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j8YFd-000437-Rp for bug-gnu-emacs@gnu.org; Sun, 01 Mar 2020 18:44:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j8YFd-0003dz-PU for bug-gnu-emacs@gnu.org; Sun, 01 Mar 2020 18:44:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Mar 2020 23:44:01 +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.158310621313962 (code B ref 39649); Sun, 01 Mar 2020 23:44:01 +0000 Original-Received: (at 39649) by debbugs.gnu.org; 1 Mar 2020 23:43:33 +0000 Original-Received: from localhost ([127.0.0.1]:37084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8YFA-0003d7-Nf for submit@debbugs.gnu.org; Sun, 01 Mar 2020 18:43:32 -0500 Original-Received: from caracal.birch.relay.mailchannels.net ([23.83.209.30]:28303) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8YF8-0003cq-Hu for 39649@debbugs.gnu.org; Sun, 01 Mar 2020 18:43:31 -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 6CCB5501B60; Sun, 1 Mar 2020 23:43:29 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a50.g.dreamhost.com (100-96-217-40.trex.outbound.svc.cluster.local [100.96.217.40]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id CEF40501B3D; Sun, 1 Mar 2020 23:43:28 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a50.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); Sun, 01 Mar 2020 23:43:29 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Broad-Towering: 77a3620322e52f9b_1583106209090_3616350471 X-MC-Loop-Signature: 1583106209090:3097550926 X-MC-Ingress-Time: 1583106209090 Original-Received: from pdx1-sub0-mail-a50.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a50.g.dreamhost.com (Postfix) with ESMTP id 323C4B1AA2; Sun, 1 Mar 2020 15:43:27 -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; s=linkov.net; bh=7JQP8uVHiss2vQGYM8tlw0hd88s=; b= sqBYpbKdWeXrwZuWBYPVZJLenDcVXjAbCrFWLbBBf/hbZzdB+AJDZ4gToYzmGMty IjAWcyycYBRwC41B2QfUBU9vARmwuw1HY9Q3cohVd5JO/+ELflF+V5Qw3irpcyWn EaBvjwUSisH6/dpYmd1TMpGlkvM2o/B/A8aUZJD3SQY= 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-a50.g.dreamhost.com (Postfix) with ESMTPSA id 69EBBB1A97; Sun, 1 Mar 2020 15:43:24 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a50 In-Reply-To: <83tv38yrzd.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 01 Mar 2020 18:12:06 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedruddtfedgudefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrddvjeenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtfedrvdejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepvghlihiisehgnhhurdhorhhg 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:176744 Archived-At: >> format-mode-line already exposes it, but fails to properly >> handle its arg FACE. > > So you are saying that we already have the API exposed to Lisp, but it > (format-mode-line) doesn't work well? Exactly. >> Do you see the same button styles with the faces tab-line-tab-inactive and >> tab-line-tab-current as in the case above like they are on the real tab-line? >> These faces are lost when the arg FACE is specified. > > I don't think this is a bug, the code behaves as intended. It's just > that its intent might be not what you expect, and the available > documentation doesn't help to expect what the code does. > > The doc string says, inter alia: > > Optional second arg FACE specifies the face property to put on all > characters for which no face is specified. It says "no face is specified", but actually the face is specified on all characters of tabs, and the implementation doesn't follow the documentation, e.g.: (tab-line-format) => (#(" tab1 x" 1 5 (face tab-line-tab-current))) ==================== The face 'tab-line-tab-current' is on all characters, yet (format-mode-line (tab-line-format) 'tab-line) overwrites the face 'tab-line-tab-current' with the face 'tab-line': (format-mode-line (tab-line-format) 'tab-line) => #(" tab1 x" 1 5 (face tab-line)) ======== > But what it really means is that text produced by the various > %-constructs will have FACE if the %-constructs don't provide a face. > In your case, you supply the function with a fixed string, so > specifying FACE overrides the faces you have there, see > store_mode_line_string (which is called in this case with PROPS set to > nil). Trying to find the minimal test case, it seems working correctly by merging faces, so there is no bug in the simplest case: (format-mode-line (propertize "tab1" 'face 'tab-line-tab-current)) => #("tab1" 0 4 (face tab-line-tab-current)) (format-mode-line (propertize "tab1" 'face 'tab-line-tab-current) 'tab-line) => #("tab1" 0 4 (face (tab-line-tab-current tab-line))) In the above case tab-line-tab-current and tab-line are merged. But the bug creeps in only when there is space between tabs: (format-mode-line (concat " " (propertize "tab1" 'face 'tab-line-tab-current) " x")) #(" tab1 x" 1 5 (face tab-line-tab-current)) (format-mode-line (concat " " (propertize "tab1" 'face 'tab-line-tab-current) " x") 'tab-line) #(" tab1 x" 0 1 (face tab-line) 1 5 (face tab-line) 5 7 (face tab-line)) Here the face 'tab-line' overwrites the face 'tab-line-tab-current'. > At this point let me turn the table and ask why did you need to pass > FACE to format-mode-line in your case? What did you want to achieve? With the arg FACE it should have the same look as on the real tab-line where tabs are placed on the line that already has the face 'tab-line'.