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#44664: 28.0.50; troubles with some chars in term Date: Thu, 19 Nov 2020 16:26:58 +0200 Message-ID: <833615pglp.fsf@gnu.org> References: <83tutoqaot.fsf@gnu.org> <83blfvr8xs.fsf@gnu.org> <873617zlor.fsf@igel.home> <838sazqr2r.fsf@gnu.org> <877dqjhy0x.fsf@igel.home> <873617m4tv.fsf@gnus.org> <834klmr989.fsf@gnu.org> <83d00apm6q.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12325"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, schwab@linux-m68k.org, 44664@debbugs.gnu.org To: Jean Louis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 19 15:28:26 2020 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 1kfkv9-00032m-Sk for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Nov 2020 15:28:23 +0100 Original-Received: from localhost ([::1]:41900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfkv8-0006r3-I8 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Nov 2020 09:28:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfkuo-0006pT-1M for bug-gnu-emacs@gnu.org; Thu, 19 Nov 2020 09:28:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55314) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kfkun-0007KC-N8 for bug-gnu-emacs@gnu.org; Thu, 19 Nov 2020 09:28:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kfkun-0002Q8-IK for bug-gnu-emacs@gnu.org; Thu, 19 Nov 2020 09:28:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Nov 2020 14:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44664 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 44664-submit@debbugs.gnu.org id=B44664.16057960439254 (code B ref 44664); Thu, 19 Nov 2020 14:28:01 +0000 Original-Received: (at 44664) by debbugs.gnu.org; 19 Nov 2020 14:27:23 +0000 Original-Received: from localhost ([127.0.0.1]:38627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfkuA-0002PB-HP for submit@debbugs.gnu.org; Thu, 19 Nov 2020 09:27:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfku9-0002Oz-1p for 44664@debbugs.gnu.org; Thu, 19 Nov 2020 09:27:21 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52794) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfku3-00079w-2b; Thu, 19 Nov 2020 09:27:15 -0500 Original-Received: from [176.228.60.248] (port=1990 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kfku1-0003kA-Lx; Thu, 19 Nov 2020 09:27:14 -0500 In-Reply-To: (message from Jean Louis on Wed, 18 Nov 2020 23:06:30 +0300) 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:193717 Archived-At: > Date: Wed, 18 Nov 2020 23:06:30 +0300 > From: Jean Louis > Cc: larsi@gnus.org, schwab@linux-m68k.org, 44664@debbugs.gnu.org > > I have been searching to find references: > > https://github.com/jquast/wcwidth > > https://github.com/streamlink/streamlink/pull/2032 This is not relevant, Emacs has this data as well. But since you are running a GUI session, the width of characters is not what's important; what's important is the width of the font glyphs that Emacs uses to display the non-ASCII characters in the term buffer. > But I can also see many problems without any wide characters. > > I am also observing various switches of fonts. I have tried setting > Terminus font and then I see that when I run mutt that the font > changes to something else. After $ reset, it seem to have half > Terminus and prompts to be DejaVu Sans, then after several killing of > terminal buffer and restarts it started appearing everything to be > using Terminus font. First, start by trying this in "emacs -Q", to make sure it isn't due to some customizations of yours. Then, to see what fonts are used for the "unusual" characters, use M-: (font-at POS) RET where POS is the buffer position of the offending character. Alternatively, go to the character and type "C-u C-x =", it will pop up a buffer with a lot of information including the font. My guess is that Emacs uses a font other than the default for those problematic characters. > There are 2 screenshots attached: > > 1. One is Emacs M-x term there is line, above the line (53) and one > can see it being pulled to the left side > > 2. XTerm version shows it is displayed aligned to the column. There's no magic here. Xterm uses the same -misc-fixed-medium font that Emacs does, at least by default. It is possible that you or someone else (the distribution managers?) provided X resources for xterm that configure it in some optimal way by specifying fixed-pitch fonts for some non-ASCII scripts, so I would suggest to look at .Xdefaults and other sources of X resources and customizations; you could then use that information in Emacs, because Emacs supports similar font customization features. You could also try running term.el in a -nw session inside the same xterm, to see if there is a difference -- in that case, Emacs doesn't control the fonts at all. > I have: > > alias ls='ls --color=auto' > > and each time I invoke ls I can see that font also changed for the > rest of work. If I invoke $ reset and then /bin/ls then I remain in > the same font. Again, what are the two fonts used in this screenshot? Use the above-mentioned techniques to tell, and use "emacs -Q" to eliminate the possibility that it's due to your customizations. Also, do you have the LS_COLORS environment variable set, and if so, what is its value?