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: Sun, 28 Nov 2021 09:48:48 +0200 Message-ID: <83fsrgyb33.fsf@gnu.org> References: <83o86616m2.fsf@gnu.org> <834k7y0xjv.fsf@gnu.org> <83r1b1zvqe.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32423"; 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 Sun Nov 28 08:49:32 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 1mrEwG-0008G4-8E for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Nov 2021 08:49:32 +0100 Original-Received: from localhost ([::1]:52152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrEwE-0000uQ-R3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Nov 2021 02:49:30 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrEvn-0000sl-BV for bug-gnu-emacs@gnu.org; Sun, 28 Nov 2021 02:49:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51571) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrEvm-0005vh-Ba for bug-gnu-emacs@gnu.org; Sun, 28 Nov 2021 02:49:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mrEvl-00007u-U6 for bug-gnu-emacs@gnu.org; Sun, 28 Nov 2021 02:49:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Nov 2021 07:49:01 +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.1638085730467 (code B ref 52129); Sun, 28 Nov 2021 07:49:01 +0000 Original-Received: (at 52129) by debbugs.gnu.org; 28 Nov 2021 07:48:50 +0000 Original-Received: from localhost ([127.0.0.1]:34884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mrEvZ-00007T-Lt for submit@debbugs.gnu.org; Sun, 28 Nov 2021 02:48:49 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mrEvW-00007G-9d for 52129@debbugs.gnu.org; Sun, 28 Nov 2021 02:48:48 -0500 Original-Received: from [2001:470:142:3::e] (port=54978 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 1mrEvQ-0005tn-Q8; Sun, 28 Nov 2021 02:48:40 -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=D7Kdr0HiRtBNQKBbqG8x6TGFCWn23v7yewl2qvCC/ZM=; b=hei/ypuEGjJJ psacVnNpsXPWs57EeWpR7DFXWf/13Sj9BLY6higrJ8Z7puVdnb/JVjWFwuwulzVaONC9ow7hxyXiO /AINEPS7zFyKf/Yr3WbMxPkAei0bnA2mIL9YRgNDKs7RGydnOsNfsaP7jHRV/aVksTRYo15r30HmS YB0MxVt4E28ICf52C0BHYBa1kkrUlxyBxYzH2bEu6zk7SJlDKs2lu444kNqaBBgbimIeqIbF+UnES VERJzlj4sWC1sqaG0566T4uFg4HcKap2SXdmPyE/twhjI7Q4gUB5z/aZscHOb79RBRX6TpY1Gnr5T stJOfBusQAsvUTebssApyg==; Original-Received: from [87.69.77.57] (port=1409 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 1mrEvO-0000wR-OW; Sun, 28 Nov 2021 02:48:40 -0500 In-Reply-To: (message from Arthur Miller on Sun, 28 Nov 2021 00:40:30 +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:220953 Archived-At: > From: Arthur Miller > Cc: 52129@debbugs.gnu.org > Date: Sun, 28 Nov 2021 00:40:30 +0100 > > > That's because it centers the first character of the string, not its > > middle character. > > That too; so you see, it is not as simple to get it right by just prepending a > space with :align-to center property. We've been through this: you need to dynamically compute the pixel coordinate to align-to, as function of the string width. > >> Is there any way to make it aware of surrounding context, like entire line? Or > >> would that be too demanding computationally? > > > > I don't think I understand what you mean by "surrounding context", and > > what would it mean for it to "be aware" of it? > > With context I meant simply the line, or at least part of the line to be > displayed. To be aware of it = to take it into consideration when displaying > line, so things like suggested would be possible. The display engine considers the line as a whole only when the entire screen line has been laid out, i.e. we get to a newline or the X coordinate is at the right edge of the window. Before that, there's no information about the "line context".