From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mohsin Kaleem Newsgroups: gmane.emacs.bugs Subject: bug#48257: [kisara.moe] Re: [kisara.moe] Re: [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 18:40:19 +0100 Message-ID: <87y2cl41a4.fsf@kisara.moe> References: <20210506151653.31575A08EB@mail.kisara.moe> <83v97p43uo.fsf@gnu.org> <877dk55h90.fsf@kisara.moe> <83tun9428a.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7443"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48257@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 11 19:42:15 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 1lgWOc-0001r6-Fp for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 May 2021 19:42:14 +0200 Original-Received: from localhost ([::1]:54050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgWOa-0004e0-To for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 May 2021 13:42:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgWOQ-0004dd-3z for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 13:42:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53995) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgWOP-0005Ad-Sk for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 13:42:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lgWOP-0007Rv-Q7 for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 13:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mohsin Kaleem Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 May 2021 17:42:01 +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.162075489728598 (code B ref 48257); Tue, 11 May 2021 17:42:01 +0000 Original-Received: (at 48257) by debbugs.gnu.org; 11 May 2021 17:41:37 +0000 Original-Received: from localhost ([127.0.0.1]:37306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgWO1-0007RC-99 for submit@debbugs.gnu.org; Tue, 11 May 2021 13:41:37 -0400 Original-Received: from 119.ip-51-38-65.eu ([51.38.65.119]:52514 helo=mail.kisara.moe) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgWNz-0007R4-Fl for 48257@debbugs.gnu.org; Tue, 11 May 2021 13:41:36 -0400 Original-Received: from mk-desktop (unknown [90.215.36.244]) by mail.kisara.moe (Postfix) with ESMTPSA id 20928A0520; Tue, 11 May 2021 19:41:34 +0200 (CEST) In-Reply-To: <83tun9428a.fsf@gnu.org> 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:206265 Archived-At: Eli Zaretskii writes: > [Please use Reply All to keep the bug address on the CC list.] > Oooh, sorry, I recently started managing email from within emacs (good excuse to report to the developer mailing list) and I'm still kind of rusty with all the stuff I used to rely on a dedicated program for. > > We have the window-at-side-p function; is that what you want? > Oh, yep, that should work. Not the nicest solution because you're mode-line will be inconsistent if you open the same window in both a terminal and then a GUI frame but for most use-cases it should be fine. I believe I tried this back when I first raised the issue with doom-modeline and ran into some performance issues but it seems to be working fine now (might've been some other problem in this case). ```lisp (defun +mode-line-align (left right) "Return a string of `window-width' length containing LEFT and RIGHT, aligned respectively." (list left (propertize " " 'display `((space :align-to (- (+ right right-fringe right-margin) ,(if (and (not (display-graphic-p)) (window-at-side-p nil 'right)) 0 1) ;; WARN: Requires double evaluation of RHS forms for spacing. ,(string-width (format-mode-line (cons "" right))))))) right)) (setq-default mode-line-format `((:eval (+mode-line-align '("foo") '("bar"))))) (setq mode-line-format (default-value 'mode-line-format)) ``` Thank you for the suggestion. :-) > > It is controlled by the current display-table. > > > 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. Nice. I'm not experienced enough to delve into this yet, but I will when I get a chance. Thank you for your time and patience :-). Yours sincerely, Mohsin K.