From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#48257: [kisara.moe] Re: [kisara.moe] Re: bug#48257: [kisara.moe] 28.0.50; Align to right doesn't account for window separator in terminal frames Date: Tue, 11 May 2021 20:19:49 +0300 Message-ID: <83tun9428a.fsf@gnu.org> References: <20210506151653.31575A08EB@mail.kisara.moe> <83v97p43uo.fsf@gnu.org> <877dk55h90.fsf@kisara.moe> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15763"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48257@debbugs.gnu.org To: Mohsin Kaleem Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 11 19:20:45 2021 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 1lgW3o-0003yk-Rw for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 May 2021 19:20:44 +0200 Original-Received: from localhost ([::1]:35420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgW3n-0006tb-PW for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 May 2021 13:20:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgW3I-0006cS-1x for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 13:20:12 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53945) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgW38-0000Cu-Lb for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 13:20:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lgW38-0006sh-Gn for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 13:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 May 2021 17:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 48257-submit@debbugs.gnu.org id=B48257.162075359326432 (code B ref 48257); Tue, 11 May 2021 17:20:02 +0000 Original-Received: (at 48257) by debbugs.gnu.org; 11 May 2021 17:19:53 +0000 Original-Received: from localhost ([127.0.0.1]:37258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgW2z-0006sG-D6 for submit@debbugs.gnu.org; Tue, 11 May 2021 13:19:53 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgW2x-0006s3-IJ for 48257@debbugs.gnu.org; Tue, 11 May 2021 13:19:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58156) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgW2q-000061-Pa; Tue, 11 May 2021 13:19:46 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2205 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgW2q-0001zy-4d; Tue, 11 May 2021 13:19:44 -0400 In-Reply-To: <877dk55h90.fsf@kisara.moe> (message from Mohsin Kaleem on Tue, 11 May 2021 18:10:03 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:206261 Archived-At: [Please use Reply All to keep the bug address on the CC list.] > From: Mohsin Kaleem > Date: Tue, 11 May 2021 18:10:03 +0100 > > So what would be the recommended approach for mode-line developers > detect that their not on a rightmost window and then add the extra space > to prevent the mode-line being truncated? We have the window-at-side-p function; is that what you want? > Personally I still think this is a bug because the mode-line doesn't > control whether the window-separator glyph is shown or not. It is controlled by the current display-table. > If the > mode-line intends to right-align some text it should be right-aligned > without having to consider corner-cases such as the window position. > Especially seeing as this isn't an issue on GUI frames, only terminal > frames. I'd suggest adding a right-separator alongside right-fringe and > right-margin so that mode-line developers don't have to concern > themselves with this. > > Alternatively it'd be nice if emacs just took care of spacing and > alignment itself. With so many mode-lines re-implementing the same > general logic to right align a segment, a built-in construct might be > more general and avoid the issue of alignment here. It'll also avoid the > need to evaluate the right-segment twice (first to get it's width and > then to actually render it). > > For example vim has a status-line construct (I believe %=) which is > replaced with the appropriate number of spaces to separate two or more > groups. > For example with a window width of 12 and a status-line format of > "foo%=bar", we'd get a rendered status-line of "foo bar". > Similarly with a format of "foo%=bar%=baz" we'd get "foo bar baz". If someone wants to work on providing patches to support any of your suggestions, I'm sure it will be welcome, at least as an optional feature. TIA.