From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 24 20:24:18 2024 Received: (at submit) by debbugs.gnu.org; 25 Sep 2024 00:24:18 +0000 Received: from localhost ([127.0.0.1]:52791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stFpJ-0005av-Us for submit@debbugs.gnu.org; Tue, 24 Sep 2024 20:24:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:56592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stFpH-0005ak-VJ for submit@debbugs.gnu.org; Tue, 24 Sep 2024 20:24:16 -0400 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 1stFos-0005Is-H3 for bug-gnu-emacs@gnu.org; Tue, 24 Sep 2024 20:23:50 -0400 Received: from out-176.mta1.migadu.com ([2001:41d0:203:375::b0]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1stFop-00064W-Hy for bug-gnu-emacs@gnu.org; Tue, 24 Sep 2024 20:23:50 -0400 Content-Type: multipart/mixed; boundary=d5b1fbf0bd657e05dd42f9a132d117a8b9ae4369a36bf12df168d2fe8044 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thomasvoss.com; s=key1; t=1727223815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=KFkM3z5rynYYqqQUprxuIaYQ4tqcaModf9uvoLBmQhI=; b=MlrD1HDwPOmn0Vp/pjyRTTVTAt6Zl+uuA2EdHgBYLYth/hzEiMsEUhuSZLqe3LOzMuLugD reYYKlDMUyrYsYmfETg0tCu04zNPl4n6kfADgIf0MJQS49EDC818TRtt9+HSIxWdjudfkN mIXox73E9YNfIHP10TOlKVz9UPtNkmxJJwI3iyu6+2L2MdxDpi5bR8gInbDr5hASb1HwG6 0v8G5896RF6EtM07uEc87cpXdCBhLh9GyZmje+lPAK+uKkFnwmLudTzmB6XwoqIiUEZ/9P z54qo2N16FbmJ4wiEW0bqOMxEIuFEjTec5NXutA5rudjglaJ/vJHHnUslhwUWg== Mime-Version: 1.0 Date: Wed, 25 Sep 2024 02:23:29 +0200 Message-Id: Subject: [PATCH] Align columns with wide characters properly X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "Thomas Voss" To: X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:203:375::b0; envelope-from=mail@thomasvoss.com; helo=out-176.mta1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --d5b1fbf0bd657e05dd42f9a132d117a8b9ae4369a36bf12df168d2fe8044 Content-Type: multipart/alternative; boundary=fc94cdf705c04724f768239f69384821e05ed4279276c938b5a2d746bad5 --fc94cdf705c04724f768239f69384821e05ed4279276c938b5a2d746bad5 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Content-Type: text/plain; charset=UTF-8 Hi all, For a while I=E2=80=99ve been bugged by some behaviour in Which-Key. My fo= nt of choice is Iosevka =E2=80=94 a font that is quite popular =E2=80=94 and it c= hooses to make the ellipsis character 2-columns wide. This is typically not a problem, but it causes Which-Key columns to appear misaligned as it truncates long descriptions with the ellipsis by default when the user configures it to use Unicode (and I rather enjoy the ellipsis). This happens despite the following being in my init.el: (set-char-table-range char-width-table ?=E2=80=A6 2) After further investigation, this appears to be due to a simple usage of =E2=80=98length=E2=80=99=C2=A0instead of =E2=80=98string-width=E2=80=99. T= he following trivial patch attached to this email seems to have solved this issue. --=20 =E2=80=94 Thomas --fc94cdf705c04724f768239f69384821e05ed4279276c938b5a2d746bad5-- --d5b1fbf0bd657e05dd42f9a132d117a8b9ae4369a36bf12df168d2fe8044 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=0001-Align-columns-with-wide-characters-properly.patch Content-Type: text/x-patch; charset=utf-8; name=0001-Align-columns-with-wide-characters-properly.patch RnJvbSBiODdkZThiZWIxNzU4MjYwOGFmYjdlOWYzMGU2NzA4NWM1ZDc4ZDdhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBUaG9tYXMgVm9zcyA8bWFpbEB0aG9tYXN2b3NzLmNvbT4KRGF0 ZTogV2VkLCAyNSBTZXAgMjAyNCAwMjoxNzo0OSArMDIwMApTdWJqZWN0OiBbUEFUQ0hdIEFsaWdu IGNvbHVtbnMgd2l0aCB3aWRlIGNoYXJhY3RlcnMgcHJvcGVybHkKTUlNRS1WZXJzaW9uOiAxLjAK Q29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PVVURi04CkNvbnRlbnQtVHJhbnNmZXIt RW5jb2Rpbmc6IDhiaXQKCkluIHRoZSBjYXNlIHRoYXQgYSBjaGFyYWN0ZXIgaW4gdGFrZXMgdXAg bXVsdHBsZSBjb2x1bW5zIChzdWNoIGFzIGDigKYnCndoZW4gdXNlZCBhcyBhIHRydW5jYXRpb24g Y2hhcmFjdGVyKSBtYWtlIHN1cmUgdGhhdCB0aGUgY29sdW1ucyBhcmUKc3RpbGwgYWxpZ25lZCBw cm9wZXJseS4KKiBsaXNwL3doaWNoLWtleS5lbCAod2hpY2gta2V5LS1wYWQtY29sdW1uKToKVXNl IGBzdHJpbmctd2lkdGgnIGluc3RlYWQgb2YgYGxlbmd0aCcuCgpDb3B5cmlnaHQtcGFwZXJ3b3Jr LWV4ZW1wdDogeWVzCi0tLQogbGlzcC93aGljaC1rZXkuZWwgfCAyICstCiAxIGZpbGUgY2hhbmdl ZCwgMSBpbnNlcnRpb24oKyksIDEgZGVsZXRpb24oLSkKCmRpZmYgLS1naXQgYS9saXNwL3doaWNo LWtleS5lbCBiL2xpc3Avd2hpY2gta2V5LmVsCmluZGV4IDkxZWIwNWMuLmZiMDY4NWMgMTAwNjQ0 Ci0tLSBhL2xpc3Avd2hpY2gta2V5LmVsCisrKyBiL2xpc3Avd2hpY2gta2V5LmVsCkBAIC0yMDM3 LDcgKzIwMzcsNyBAQCB0aGF0IHdpZHRoLiIKICAgICAgICAgICAobWFwY2FyIChwY2FzZS1sYW1i ZGEgKGAoLGtleSAsc2VwICxkZXNjICxfZG9jKSkKICAgICAgICAgICAgICAgICAgICAgKGNvbmNh dAogICAgICAgICAgICAgICAgICAgICAgKGZvcm1hdCBjb2wtZm9ybWF0IGtleSBzZXAgZGVzYykK LSAgICAgICAgICAgICAgICAgICAgIChtYWtlLXN0cmluZyAoLSBjb2wtZGVzYy13aWR0aCAobGVu Z3RoIGRlc2MpKSA/XHMpKSkKKyAgICAgICAgICAgICAgICAgICAgIChtYWtlLXN0cmluZyAoLSBj b2wtZGVzYy13aWR0aCAoc3RyaW5nLXdpZHRoIGRlc2MpKSA/XHMpKSkKICAgICAgICAgICAgICAg ICAgIGNvbC1rZXlzKSkpKQogCiAoZGVmdW4gd2hpY2gta2V5LS1wYXJ0aXRpb24tbGlzdCAobiBs aXN0KQotLSAKMi40Ni4xCgo= --d5b1fbf0bd657e05dd42f9a132d117a8b9ae4369a36bf12df168d2fe8044-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 07:57:40 2024 Received: (at 73463-done) by debbugs.gnu.org; 25 Sep 2024 11:57:40 +0000 Received: from localhost ([127.0.0.1]:57720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stQeK-0003e1-Fd for submit@debbugs.gnu.org; Wed, 25 Sep 2024 07:57:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stQeI-0003dm-N0 for 73463-done@debbugs.gnu.org; Wed, 25 Sep 2024 07:57:39 -0400 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 1stQdn-0000XB-Dq; Wed, 25 Sep 2024 07:57:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=fyKWGWIojy8NfarvhEqzu9LvQ+IE37Mt8YGNUEk2fSY=; b=ZNG6N0D7C9vOVheiyE4O L3IWIo+Xy14sKQo8hb6iVnRbVYV4Luewvjxmq9UHXoD0qG4YSqeOkxXPIh+J60Tu9hEi7sEBH4kUp 6MyMAz3nRp38O642biMcsbxKn9jqTteXCfhyNUWSvZ4q772Rn2yuddk8OwJxfMM8wURhLjYzKb/yk 5TKSnGarBDnB/smf4r+qaF3/ZdNPzJ53f357wHJ24cfouOzEb6TqOScoYP3nKVfIaFOhj2g7hGdWH /yr2dq5sbb975hPx6aiPEsTG7sXph1VgYQN/znTfeZgeopPGIFqtiPcV3OhvgmtRmwDQRNwD6relw ZKxwPZqctHn1jA==; Date: Wed, 25 Sep 2024 14:57:03 +0300 Message-Id: <86ed58c5f4.fsf@gnu.org> From: Eli Zaretskii To: "Thomas Voss" In-Reply-To: (bug-gnu-emacs@gnu.org) Subject: Re: bug#73463: [PATCH] Align columns with wide characters properly References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73463-done Cc: 73463-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 25 Sep 2024 02:23:29 +0200 > From: "Thomas Voss" via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > For a while I’ve been bugged by some behaviour in Which-Key. My font of > choice is Iosevka — a font that is quite popular — and it chooses to make > the ellipsis character 2-columns wide. This is typically not a problem, > but it causes Which-Key columns to appear misaligned as it truncates long > descriptions with the ellipsis by default when the user configures it to > use Unicode (and I rather enjoy the ellipsis). > > This happens despite the following being in my init.el: > > (set-char-table-range char-width-table ?… 2) > > After further investigation, this appears to be due to a simple usage of > ‘length’ instead of ‘string-width’. The following trivial patch attached > to this email seems to have solved this issue. Thanks, installed on the emacs-30 branch, and closing the bug. From unknown Fri Aug 15 15:31:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 24 Oct 2024 11:24:19 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator