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#46476: Feature request: Right-aligning part of the modeline Date: Sat, 13 Feb 2021 20:08:30 +0200 Message-ID: <837dnbden5.fsf@gnu.org> References: <83ft20e5z0.fsf@gnu.org> <83a6s7dhv0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16850"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46476@debbugs.gnu.org To: =?UTF-8?Q?Pawe=C5=82_?= =?UTF-8?Q?Kra=C5=9Bnicki?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 13 19:09:29 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 1lAzMH-0004Hw-N9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Feb 2021 19:09:29 +0100 Original-Received: from localhost ([::1]:58606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAzMG-0006ZJ-QZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Feb 2021 13:09:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAzLq-0006Yf-H9 for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2021 13:09:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51685) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lAzLq-0001HS-AI for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2021 13:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lAzLq-00018A-42 for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2021 13:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Feb 2021 18:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46476 X-GNU-PR-Package: emacs Original-Received: via spool by 46476-submit@debbugs.gnu.org id=B46476.16132397214316 (code B ref 46476); Sat, 13 Feb 2021 18:09:02 +0000 Original-Received: (at 46476) by debbugs.gnu.org; 13 Feb 2021 18:08:41 +0000 Original-Received: from localhost ([127.0.0.1]:34998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAzLU-00017Y-Ub for submit@debbugs.gnu.org; Sat, 13 Feb 2021 13:08:41 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAzLR-00017H-QL for 46476@debbugs.gnu.org; Sat, 13 Feb 2021 13:08:39 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54403) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAzLM-000168-LR; Sat, 13 Feb 2021 13:08:32 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4315 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lAzLM-0002dn-3R; Sat, 13 Feb 2021 13:08:32 -0500 In-Reply-To: (message from =?UTF-8?Q?Pawe=C5=82_?= =?UTF-8?Q?Kra=C5=9Bnicki?= on Sat, 13 Feb 2021 18:45:14 +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:199945 Archived-At: > From: Paweł Kraśnicki > Date: Sat, 13 Feb 2021 18:45:14 +0100 > Cc: 46476@debbugs.gnu.org > > > If people use :align-to, then what would be the advantage of providing > > %-constructs to produce the same? > > Well, the only advantage is that people wouldn't need to install an external > package or write a short but advanced piece of Lisp. I think that right > alignment is such a commonly used feature that it would be good to have it > accessible very easily. (Center alignment and segments are less popular.) > I actually got the idea for using %= in particular from Vim, which has right > alignment under this %-construct. This currently seems to be somewhat problematic, given the recursive manner in which the mode line elements are produced by the display code. > > That'd require two passes to generate the mode-line display, right? > > I think so. Emacs would have to first expand the modeline constructs in the > segments separately into some internal data structure, then decide which ones to > actually display. Patches welcome.