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#48257: Align to right doesn't account for window separator in terminal frames Date: Tue, 06 Jul 2021 15:49:42 +0300 Message-ID: <83mtqzfvyx.fsf@gnu.org> References: <20210506151653.31575A08EB@mail.kisara.moe> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32984"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48257@debbugs.gnu.org To: Kevin Boulain Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 06 14:50: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 1m0kWg-0008KQ-Gn for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Jul 2021 14:50:10 +0200 Original-Received: from localhost ([::1]:54134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0kWf-0006xz-IB for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Jul 2021 08:50:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0kWY-0006xo-E3 for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2021 08:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36120) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0kWY-0001XT-5j for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2021 08:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m0kWY-00012R-3p for bug-gnu-emacs@gnu.org; Tue, 06 Jul 2021 08:50: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: Tue, 06 Jul 2021 12:50:02 +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.16255757833942 (code B ref 48257); Tue, 06 Jul 2021 12:50:02 +0000 Original-Received: (at 48257) by debbugs.gnu.org; 6 Jul 2021 12:49:43 +0000 Original-Received: from localhost ([127.0.0.1]:47658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0kWF-00011W-02 for submit@debbugs.gnu.org; Tue, 06 Jul 2021 08:49:43 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0kWD-00011E-Dz for 48257@debbugs.gnu.org; Tue, 06 Jul 2021 08:49:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40118) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0kW8-0001K0-0U; Tue, 06 Jul 2021 08:49:36 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4907 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 1m0kW6-0001iE-LA; Tue, 06 Jul 2021 08:49:34 -0400 In-Reply-To: (message from Kevin Boulain on Mon, 5 Jul 2021 23:04:38 +0200) 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:209516 Archived-At: > From: Kevin Boulain > Date: Mon, 5 Jul 2021 23:04:38 +0200 > > I believe I have a similar issue (I think this behavior has been > present for a while). > Paste and eval this in the scratch buffer (emacs -Q, running from a terminal): > (global-set-key (kbd "") > (lambda () > (interactive) > ;; 4 chars margin > (setq-local right-margin-width 4) > ;; force margin to take effect > (set-window-buffer (selected-window) (current-buffer)) > ;; insert in the margin > (insert (propertize " " 'display '((margin > right-margin) "1234") 'default t)) > ;; split the window, should showcase the issue > (split-window-right))) > > Then press F10 (doesn't matter where the point is): it will set up a > right margin of width 4, insert "1234" then split the window into two. > The window on the left will only show "123" ("4" is probably hidden > behind the window divider) while the right window correctly shows > "1234". I don't think it's related, I think it's a separate issue. Notice how the truncated "123" string starts 2 columns after the "$" truncation indicator, whereas the un-truncated "1234" starts only 1 column after "$". So I think there's something else at work here, and will take a closer look soon. Thanks.