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#52129: 29.0.50; Wish: Extend `:align-to center' to work on lines in buffer Date: Sat, 27 Nov 2021 07:59:33 +0200 Message-ID: <83o86616m2.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3788"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52129@debbugs.gnu.org To: Arthur Miller Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 27 07:00:19 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 1mqql0-0000or-Cu for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Nov 2021 07:00:18 +0100 Original-Received: from localhost ([::1]:36062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mqqky-0000MZ-7k for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Nov 2021 01:00:16 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqqkl-0000MA-66 for bug-gnu-emacs@gnu.org; Sat, 27 Nov 2021 01:00:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49428) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mqqkk-0000UH-Sl for bug-gnu-emacs@gnu.org; Sat, 27 Nov 2021 01:00:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mqqkk-0008D1-NX for bug-gnu-emacs@gnu.org; Sat, 27 Nov 2021 01:00: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, 27 Nov 2021 06:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52129 X-GNU-PR-Package: emacs Original-Received: via spool by 52129-submit@debbugs.gnu.org id=B52129.163799277731499 (code B ref 52129); Sat, 27 Nov 2021 06:00:02 +0000 Original-Received: (at 52129) by debbugs.gnu.org; 27 Nov 2021 05:59:37 +0000 Original-Received: from localhost ([127.0.0.1]:60974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqqkK-0008By-SW for submit@debbugs.gnu.org; Sat, 27 Nov 2021 00:59:37 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqqkJ-0008Bk-6k for 52129@debbugs.gnu.org; Sat, 27 Nov 2021 00:59:35 -0500 Original-Received: from [2001:470:142:3::e] (port=44834 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqqkB-0000OE-Kb; Sat, 27 Nov 2021 00:59:28 -0500 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=jNcI9YsxsXdOtsFSs/uBNRSaTr5eZ88tyA9xKlyK1D4=; b=Z25qrSfjv1F+ kWgcsp8UxTDIqPRar4ZeqxbUAd3n8654QscpMbyJ4Lq2In/kjDCmglqqRs48LtpCOgxzTpgV+g8b6 b1glOQugLkIL8ILeGNNTk1F/wO8Yd9cJU9oQtFaJMDF8HD7/Yn1el11Uxdfzu1LdXF8OZsb0ljA+j j+SMGJonb2m+pcOjDm6zPsSRFNk+sCsJaznMSiPHaS1ra2mO+u1p1/+NHezl7gN7wh69jDck98NeX 39lF9AQgh/s/UcpuhrbPBJygToCBC+LNN6hhiW75BW9PuBDwRsL7RJrCI9sPbBuJF1IG23f5kr+IX q9bQWB6R0UYDT++npSCxkA==; Original-Received: from [87.69.77.57] (port=2538 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 1mqqkA-0000ra-6N; Sat, 27 Nov 2021 00:59:27 -0500 In-Reply-To: (message from Arthur Miller on Fri, 26 Nov 2021 21:01:11 +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:220893 Archived-At: > From: Arthur Miller > Date: Fri, 26 Nov 2021 21:01:11 +0100 > > I am not sure if the title is descriptive enough, or even correct, but as seen > from attached code and image, I am trying to align two strings in a center of > each strings line. > > It works now when string-pixel-width correctly calculates pixel widths. However, > I would prefer if I could just use :align-to center as a spec for a string as > property. Currently we have to use space as a spacer as we used to use > gif-spacers back in time. > > I am not sure about how semantics would work, there are several cases to > consider, but generally if a string or a stretch of text in a string were given > text property 'display '(:align-to center), then Emacs would align that stretch > of text in the middle of the line that text occupies. I don't understand what exactly are you asking for. Is your problem that you have to prepend some character to the string and put the :align-to spec on that character? Because AFAIU that simple measure should achieve your goal. If that's not what you want, or if what I described doesn't work, please show some simple code to explain your requests.