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.devel Subject: Re: on helm substantial differences Date: Sun, 22 Nov 2020 17:19:20 +0200 Message-ID: <83lfetxvuv.fsf@gnu.org> References: <87wnymda5g.fsf@mail.linkov.net> <87ima5he8j.fsf@mail.linkov.net> <87mtzfzt9a.fsf@mail.linkov.net> <87lfezd8r0.fsf@mail.linkov.net> <87k0uj58ub.fsf@mail.linkov.net> <87lfey28us.fsf@tcd.ie> <87ft56h6sr.fsf@mail.linkov.net> <87y2iybe27.fsf@mail.linkov.net> <873614ido7.fsf@mail.linkov.net> <83tutkz1ea.fsf@gnu.org> <83sg94z0ku.fsf@gnu.org> <87zh3aqxa7.fsf@mail.linkov.net> <83sg92xdz6.fsf@gnu.org> <87sg914wlp.fsf@mail.linkov.net> 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="2947"; mail-complaints-to="usenet@ciao.gmane.io" Cc: spacibba@aol.com, bugs@gnu.support, andreyk.mad@gmail.com, emacs-devel@gnu.org, contovob@tcd.ie, rudalics@gmx.at, monnier@iro.umontreal.ca, ghe@sdf.org, drew.adams@oracle.com To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 22 16:20:02 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kgr9m-0000db-F2 for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Nov 2020 16:20:02 +0100 Original-Received: from localhost ([::1]:59828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgr9l-0000YL-Gl for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Nov 2020 10:20:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgr9I-00007g-8Q for emacs-devel@gnu.org; Sun, 22 Nov 2020 10:19:32 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45501) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgr9E-0005Ta-U1; Sun, 22 Nov 2020 10:19:28 -0500 Original-Received: from [176.228.60.248] (port=4189 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kgr9E-0006wB-BB; Sun, 22 Nov 2020 10:19:28 -0500 In-Reply-To: <87sg914wlp.fsf@mail.linkov.net> (message from Juri Linkov on Sun, 22 Nov 2020 10:36:02 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:259616 Archived-At: > From: Juri Linkov > Date: Sun, 22 Nov 2020 10:36:02 +0200 > Cc: spacibba@aol.com, bugs@gnu.support, andreyk.mad@gmail.com, > emacs-devel@gnu.org, contovob@tcd.ie, rudalics@gmx.at, > monnier@iro.umontreal.ca, ghe@sdf.org, drew.adams@oracle.com > > > The result of char-width can only ever be 0, 1, or 2. On GUI frames, > > it doesn't always return the exact value, because characters can be > > wider than 1, but narrower than 2. But no character should be wider > > than 2 columns. Which characters did you see that required the width > > of 3 or 4? > > I tried to set tab-width to 4, and the first character > that doesn't fit to the 4-column tab stop is: > > ഐ MALAYALAM LETTER AI > > But (char-width ?ഐ) returns 1. Some examples of more 4-column wide > characters where char-width returns 1: > > ை TAMIL VOWEL SIGN AI > ෛ SINHALA VOWEL SIGN KOMBU DEKA > ꧅ JAVANESE PADA LUHUR > 𒐫 CUNEIFORM NUMERIC SIGN NINE SHAR2 On GUI frames, this depends on the font in use. You cannot really rely on char-width to solve this. > Maybe there is another function that could return the real number of > tab columns a character takes on the screen? There is: font-get-glyphs. But I'd recommend to just use a TAB of a suitable width instead of dealing with the complexity that font-get-glyphs requires.