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#73463: [PATCH] Align columns with wide characters properly Date: Wed, 25 Sep 2024 14:57:03 +0300 Message-ID: <86ed58c5f4.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22568"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73463-done@debbugs.gnu.org To: "Thomas Voss" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 25 13:57:59 2024 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 1stQec-0005eM-Uh for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Sep 2024 13:57:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1stQeJ-00048R-2r; Wed, 25 Sep 2024 07:57:39 -0400 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 1stQeG-000408-S5 for bug-gnu-emacs@gnu.org; Wed, 25 Sep 2024 07:57:37 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1stQeG-0000an-DJ for bug-gnu-emacs@gnu.org; Wed, 25 Sep 2024 07:57:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=fyKWGWIojy8NfarvhEqzu9LvQ+IE37Mt8YGNUEk2fSY=; b=Al9YJUoJ/540XrHye/r8wVTdyr0iWIjFoiVQyuCB4S6NXXCFdJLkTgw12W17tg55SAmo1na98glBAdkIbfYYqAarC1CfEYl+fAH/1XqI7g7BgBZrdo4WxZnj01LrnursOw4s9ReaFtHlT+aIhay5thAjbEPCNFyPrVNA+sgsBT6qHoqkoH6ZiBfO4nVk/mPSQ8pycFTOqF7Gn8jwzSGz1BNDmWGWu5NDXEB65yBbL/9NiiCWFtaIF4XpIpPnWOLwrDw0a9ffQIBnqzL2QOrR74AxaOoBO82P5d2wawtwYEmbhKPAXh0MELJjqJWrerb0fb0SglHPOF/sCZzdo5IsZA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1stQeg-0003en-1j for bug-gnu-emacs@gnu.org; Wed, 25 Sep 2024 07:58:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Sep 2024 11:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 73463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 73463@debbugs.gnu.org, eliz@gnu.org, mail@thomasvoss.com Original-Received: via spool by 73463-done@debbugs.gnu.org id=D73463.172726546014019 (code D ref 73463); Wed, 25 Sep 2024 11:58:01 +0000 Original-Received: (at 73463-done) by debbugs.gnu.org; 25 Sep 2024 11:57:40 +0000 Original-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 Original-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 Original-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==; In-Reply-To: (bug-gnu-emacs@gnu.org) 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:292388 Archived-At: > 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.