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.bugs Subject: bug#37667: 27.0.50; Tab Bar display problems with more than 5 tabs Date: Thu, 31 Oct 2019 02:03:51 +0200 Organization: LINKOV.NET Message-ID: <87v9s53h6o.fsf@mail.linkov.net> References: <83o8yrvzgh.fsf@gnu.org> <83h84agytj.fsf@gnu.org> <87tv89opbh.fsf@mail.linkov.net> <83mue1g845.fsf@gnu.org> <83lftlg6zc.fsf@gnu.org> <87lftlk504.fsf@mail.linkov.net> <83eezceir2.fsf@gnu.org> <87pniwuwj5.fsf@mail.linkov.net> <83blufdehy.fsf@gnu.org> <878spj57dk.fsf@mail.linkov.net> <83v9sm8rs3.fsf@gnu.org> <87blubaw63.fsf@mail.linkov.net> <83zhhu34xz.fsf@gnu.org> <8736fl91vp.fsf@mail.linkov.net> <834l0024lr.fsf@gnu.org> <87eez4pjfk.fsf@mail.linkov.net> <83ftjjzbln.fsf@gnu.org> <87d0egpjec.fsf@mail.linkov.net> <83sgnbpxq6.fsf@gnu.org> <871ruvax4p.fsf@mail.linkov.net> <835zk6p6ki.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="197157"; 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: 37667@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 31 01:17:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1iPy9K-000p9A-E2 for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Oct 2019 01:17:14 +0100 Original-Received: from localhost ([::1]:45518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPy9I-00050T-OD for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Oct 2019 20:17:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56012) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPy9A-0004zz-Lz for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2019 20:17:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPy98-0003zM-DZ for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2019 20:17:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43120) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iPy98-0003z5-A5 for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2019 20:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iPy98-0007yt-4M for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2019 20:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 31 Oct 2019 00:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37667 X-GNU-PR-Package: emacs Original-Received: via spool by 37667-submit@debbugs.gnu.org id=B37667.157248098830614 (code B ref 37667); Thu, 31 Oct 2019 00:17:02 +0000 Original-Received: (at 37667) by debbugs.gnu.org; 31 Oct 2019 00:16:28 +0000 Original-Received: from localhost ([127.0.0.1]:51940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPy8a-0007xh-3N for submit@debbugs.gnu.org; Wed, 30 Oct 2019 20:16:28 -0400 Original-Received: from aye.elm.relay.mailchannels.net ([23.83.212.6]:45040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPy8J-0007xH-PK for 37667@debbugs.gnu.org; Wed, 30 Oct 2019 20:16:13 -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 C6B3D1A1E0C; Thu, 31 Oct 2019 00:16:10 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a82.g.dreamhost.com (100-96-15-217.trex.outbound.svc.cluster.local [100.96.15.217]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 184101A1DE7; Thu, 31 Oct 2019 00:16:10 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a82.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); Thu, 31 Oct 2019 00:16:10 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Reaction-Thread: 5bc0f5622ec5ba44_1572480970313_3008204913 X-MC-Loop-Signature: 1572480970313:681676675 X-MC-Ingress-Time: 1572480970313 Original-Received: from pdx1-sub0-mail-a82.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a82.g.dreamhost.com (Postfix) with ESMTP id A297680153; Wed, 30 Oct 2019 17:16:04 -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=Gc7/Mbp7faYUXtmrAPNiN6EpmC8=; b= a6M1Q6BmdjYqUWX6Kln+ZO4c9HfAyKEhYhQP0cVSmeBo1DzMAg0xb5TgaLOAizIs ki5WgchYiIodCjNKx0rtnUmdnkguoT7FfpZVAKVExVBLTzlT+GW2L+T4f5L/00n1 nZ/EPv4InhGRgEhLsTC4y+KZVF0DlLisT1V6JaifqcA= Original-Received: from mail.jurta.org (m91-129-101-77.cust.tele2.ee [91.129.101.77]) (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-a82.g.dreamhost.com (Postfix) with ESMTPSA id 508FF8015D; Wed, 30 Oct 2019 17:16:02 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a82 In-Reply-To: <835zk6p6ki.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 30 Oct 2019 17:59:57 +0200") 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:170494 Archived-At: >> I don't want to modify display_string to take the tab-line >> into account because more logic for searching the current tab >> needs to be implemented anyway. > > Searching the current tab and displaying truncation indicators are two > separate tasks that don't necessarily need the same (or even similar) > code. The former could be found much easier, I think. Before starting to search the current tab, the code needs to known whether truncation really occurred. >> So maybe better to copy code from display_string to a new function >> tab_visible_in_tab_line, and beside detection of truncation also add >> more code to detect a situation when the current tab is not visible >> due to truncation. > > I don't think these two jobs are similar enough, but maybe I don't > understand well enough what you have in mind. Can you elaborate how > you intended to search for the current tab? We need to detect whether the current tab is before the right truncation point (so it is visible), or after the truncation (so the current tab is not visible). It seems searching for the current tab is not possible in the glyph matrix, because when the current tab is after the truncation point, then its glyphs are not produced. Then the code for searching the current tab should be similar to display_string but without producing glyphs.