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#62606: [PATCH] function to align mode-line elements to right Date: Sat, 24 Jun 2023 15:05:27 +0300 Message-ID: <83leg9ysjc.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1354"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, 62606@debbugs.gnu.org To: hugo@heagren.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 24 14:06:29 2023 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 1qD228-00007d-W5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Jun 2023 14:06:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qD21m-0006t1-EP; Sat, 24 Jun 2023 08:06:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qD21j-0006sh-UT for bug-gnu-emacs@gnu.org; Sat, 24 Jun 2023 08:06:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qD21j-0006uJ-7W for bug-gnu-emacs@gnu.org; Sat, 24 Jun 2023 08:06:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qD21i-00061n-Bj for bug-gnu-emacs@gnu.org; Sat, 24 Jun 2023 08:06: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: Sat, 24 Jun 2023 12:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62606 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 62606-submit@debbugs.gnu.org id=B62606.168760832223115 (code B ref 62606); Sat, 24 Jun 2023 12:06:02 +0000 Original-Received: (at 62606) by debbugs.gnu.org; 24 Jun 2023 12:05:22 +0000 Original-Received: from localhost ([127.0.0.1]:40022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qD213-00060k-PN for submit@debbugs.gnu.org; Sat, 24 Jun 2023 08:05:22 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qD211-00060X-42 for 62606@debbugs.gnu.org; Sat, 24 Jun 2023 08:05:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qD20u-0006UD-L5; Sat, 24 Jun 2023 08:05:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mvzq6c+J137x7DyuDU5uc9rPIpuUE45HveyjUperpQw=; b=PXRHA+Q5etlk BOX02hSksi/i20LR2hU772VcxrpPHb9V9uIpxMikFXV3n2gwKJraI3rWT9QpU86GVshK+HVJg2MQu Ky4TTDRQRxVi1EMxfsffUdhp21WiJO380X0BypGXmZQMnys/i+VNO3S4MWym1f2QUAhuFPateArxu Q2Phw68SshQbqRX/FKsEHm4t21V7sfrpSzsLs6LNpdq1fRaSH5heDlXLyZjhK5dBAy1vvfxugk0ij 3cxrEEEfOukzUXBraVqc5yWgSMvE8tviOVKOCzNjQ39w0C/5gDJhxTtImbey+juJYDFXZ2Jtj8WbO yxEWd/K1UDbko8ozNv5WsQ==; Original-Received: from [87.69.77.57] (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 1qD20t-00050j-Un; Sat, 24 Jun 2023 08:05:12 -0400 In-Reply-To: (hugo@heagren.com) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263987 Archived-At: > Cc: 62606@debbugs.gnu.org > Date: Mon, 19 Jun 2023 20:06:58 +0100 > From: hugo@heagren.com > > On 2023-06-09 17:03, Stefan Monnier wrote: > > Also, the code is fairly simple and self-contained, so I don't see > > a good reason not to include that. > > Thanks :) > > > I think symbols like `right-fringe` should be enclosed in `...' > > in docstrings. > > Fixed in new patch, attached. > > > Also, I see no reason to encourage the use of an alias, > > so I'd drop either `right-margin` or `right` from the doc (especially > > since it doesn't really come for free in the code). > > Fixed. Dropped `right', as it was the less descriptive version. > > > As a user I'd wonder if "align to right-fringe" means to align to > > the beginning (i.e. left side) or end (i.e. right side) of the > > right fringe. > > Documented (and included a link to relevant info node). > > > AFAICT, this function is internal to the implementation of the > > `mode-line-format-right-align` mode-line spec. So maybe it should use > > "--" in its name. > > You're right -- Done. > > > This is the ugly part of the implementation > > Yes, I agree :( > > > an alternative is to use > > > > (..LEFT.. (:eval (mode-line-format-right-align ..RIGHT..))) > > I share your technical worries about this. I worry too that this might > end > up being more confusing for users, because it invites such constructions > as: > > (..LEFT.. (:eval (mode-line-format-right-align ..RIGHT..)) ..WHAT..) > > Where the behaviour of ..WHAT.. is at best to be completely hidden, and > at worst undefined. If we use a single symbol, this can't happen. > > I also think that, as a user, it's good to have consistent interfaces > for this sort of thing, and my proposed function is intended to work > just like `tab-bar-format-align-right', which is included as a symbol, > not a more complex construction. > > > should also be usable in `header-line-format` and friends. > > This would good though. Thanks. This will need suitable additions to NEWS and the manual. Also, we will need you to sign the copyright assignment paperwork, as the size of the changes exceeds what we can accept without an assignment. Would you like to start your assignment paperwork rolling at this time?