From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adriel Dumas--Jondeau via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#61677: 30.0.50; Display-Fill-Column-Indicator mode shifts with narrow characters near end of line Date: Tue, 21 Feb 2023 19:35:21 +0100 Message-ID: <87v8ju4ody.fsf@disroot.org> References: <87bklnnt4y.fsf@disroot.org> <835ybvt65u.fsf@gnu.org> Reply-To: Adriel Dumas--Jondeau Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31333"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61677@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 22 05:56:41 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 1pUhBJ-0007wn-7c for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Feb 2023 05:56:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUhB5-00087p-9c; Tue, 21 Feb 2023 23:56:27 -0500 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 1pUhAj-00082W-9j for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2023 23:56:05 -0500 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 1pUhAi-00055q-Vj for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2023 23:56:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pUhAi-0000uN-Rx for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2023 23:56:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Adriel Dumas--Jondeau Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Feb 2023 04:56:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61677 X-GNU-PR-Package: emacs Original-Received: via spool by 61677-submit@debbugs.gnu.org id=B61677.16770417163357 (code B ref 61677); Wed, 22 Feb 2023 04:56:04 +0000 Original-Received: (at 61677) by debbugs.gnu.org; 22 Feb 2023 04:55:16 +0000 Original-Received: from localhost ([127.0.0.1]:57716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUh9v-0000ru-Dx for submit@debbugs.gnu.org; Tue, 21 Feb 2023 23:55:16 -0500 Original-Received: from knopi.disroot.org ([178.21.23.139]:38272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUbag-000084-GA for 61677@debbugs.gnu.org; Tue, 21 Feb 2023 17:58:32 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 210A941B72; Tue, 21 Feb 2023 23:58:29 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Original-Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MB2kEL2R6LaF; Tue, 21 Feb 2023 23:58:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1677020307; bh=H+kHxt3wou8fm/jf096maUNVxq9Xsa89kASz+yRQteU=; h=References:From:To:Cc:Subject:Date:In-reply-to; b=Q9ec0mMpxZEG/SBON/YVmQgwcJxgbeI/1sgkuN4dJ0WE+W+F/PC4SVliSJdAT92WA 6QjW1RPHeu+T8PemKueE3DYUYDU2/MCaBxuCaAnvphkXnKCZxa93aQEEcgtCNXA9pw uo6VRfmSVxw53Gy3iKfUaBdqc/LGYF0uCbeELQyjcBMTi0vNMmPzi6hc1KB/LCocoL coSA4Yu0GBKzwRl/G1vs320cVYo/mFXfrNLjYAGgCIbyylDUJTzCmxBaj/KpuFWus1 XD6XoO1YcDCk4qypXJzmd/2PDXt70jbxlnhEuhGyzW+3LAQNt1765shdCC3+BQk7PV NtxEUGTxHL5TQ== In-reply-to: <835ybvt65u.fsf@gnu.org> X-Mailman-Approved-At: Tue, 21 Feb 2023 23:55:10 -0500 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:256322 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thank you for your answer and these crystal clear explanations! I have a much better understanding of what's happening now :) Eli Zaretskii writes: > AFAIU, you are using a font that is effectively a variable-pitch font: > not all of the characters have glyphs of the same width, some have > narrower glyphs. Is that correct? Yes, that's it! I didn't knew it was the =E2=80=9Cpitch=E2=80=9D of the cha= racters and couldn't look it up online. Thank you for the pointer. > Caveat: I don't have that font, so I used a different variable-pitch > font to see what happens. I assumed that this font should be available on most of systems as I made nothing to get it installed. But this assumption is wrong. I guess it should apply to any other variable-pitch font as well, perhaps on different characters. Narrow nobreak-space should behave the same on most of said fonts, though. =2D-- 8< --- What I expect from display-fill-column-indicator is at least to be able to tell at a glance whether the actual number of characters on a given line goes beyond a certain point or not, independently from their size with any given font. So having the indicator displayed even after I type 3 narrow nobreak-spaces at fill-column 1 bothers me a bit (as it should disappear once it gets past the character count limit anyway). But I also understand why we can't make it disappear based on the number of characters, as the space between the text and the indicator wouldn't represent the actual remaining empty characters in that case. Whether this expectation is shared or not, and based on my current knowledge, I think there's at least these three choices: =2D Leaving things as is (The most straightforward and efficient way, and I would be absolutely okay with that) =2D Is there any documentation somewhere about that? Adding a warning based on the current font pitch with a pointer towards a more detailed explanation on Display-Fill-Column-Indicator triggers (and maybe hooking it at frame-font changes). This would at least give some hints to users and would reduce the occurence of threads as the current one (Probably low effort unless there is doc to write about it). =2D Modifying Display-Fill-Column-Indicator in order to display two vertical guides: the =E2=80=9Cglobal=E2=80=9D vertical line that we curre= ntly have but with the catch that it should hold true for the current font pitch, pixel based, a single line at ~fill-column~ for normal characters, independent from the character count. A =E2=80=9Ccharacter count=E2=80=9D= indicator, relative to each line, that may or may not be the same as the global one, with different glyph and color, doesn't show up if the same as the global one. It means the character count glyph may only be shown with a variable-pitch font on a line that contains narrowed or wide characters (This is the most controversial suggestion I'd say). The benefit of the latter suggestion is that it still works the same with fixed-pitch font (the character count should actually be the same as the pixel size in this case), but it would be more expressive with variable-pitch, thus fixing the inconsistencies that currently occur. The caveat is it brokes the implicit rule that the indicator is about the character count with variable-pitch font (as it would truly be about taken physical space on the screen). But the fact that a new character is displayed when it's not should (could?) make things clear. I can make code suggestions for this last one (not right now though) if nobody else is willing to, and if there's no real objection to it. What do you think? =2D-=20 Adriel --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHHBAEBCAAxFiEEdTo3gYfn+XlCL0s3vM4s3nSoxFIFAmP1TIkTHGxlaXJkYUBk aXNyb290Lm9yZwAKCRC8zizedKjEUrNEDACp8TSgxMYD1b+BhTOA6cHSr1SSN+EQ hJhXhSlIJtj+hEaVHkAVYJP7mXrScpqhfxF1upaNqZffPeeIHBHdRskT877Vtxe7 oDSqGr0sM+ni8CEmP6xNfdKUk+WaYqeTrZJsbTFtDeKJUJP6VC9dF0/q9LtqEsV8 0ZY6mf4/OV1HLC3f58Vl76kDJkcS20S69eNnK+Kl6hd5bIf8zgR/5J9iqAbk378K 8qZlQlofSmYo/R0gF/0Qq9Zh1AFhQXZ7RBTndJkDVEuxaBRlcUAOb/r4A+6pI6yr pSqgvjx1kCigvEFbcPh8i72OZNMSe0dB6l1CbG4Yjz4uyxn6saOHvZEhvjFdmFSG MFODMelupGs9OSWCPLstQxlSchaOD7wCy7VGYAuZX/8L71VCs2VX+b5tk/EVEdZV 0IiFNeQNmTMB36Kl1fV1MIErLLFvYBPYzQoRp4ZGxHYANpFlURBEYs+1IChU1QNE DrlsjPuMMHZJj93CMFmdkuDA9+jMLMB/41k= =EDsS -----END PGP SIGNATURE----- --=-=-=--