From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#44236: [PATCH] xdisp: Apply nobreak-char-display also to NARROW NO-BREAK SPACE U+202F Date: Sun, 01 Nov 2020 10:30:28 +0200 Organization: LINKOV.NET Message-ID: <87zh4179of.fsf@mail.linkov.net> References: <20201026111348.773761-1-bpeeluk.ref@yahoo.co.uk> <20201026111348.773761-1-bpeeluk@yahoo.co.uk> <837drdeyss.fsf@gnu.org> <87h7q98p4q.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39096"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Neil Roberts , 44236@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 01 09:41:11 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 1kZ8vG-000A4g-MP for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 09:41:10 +0100 Original-Received: from localhost ([::1]:38334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZ8vF-0001EU-7q for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 03:41:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZ8v8-0001EJ-5E for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 03:41:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52275) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZ8v7-00012P-SP for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 03:41:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kZ8v7-0001PG-Pf for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 03:41:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Nov 2020 08:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44236 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed Original-Received: via spool by 44236-submit@debbugs.gnu.org id=B44236.16042200585390 (code B ref 44236); Sun, 01 Nov 2020 08:41:01 +0000 Original-Received: (at 44236) by debbugs.gnu.org; 1 Nov 2020 08:40:58 +0000 Original-Received: from localhost ([127.0.0.1]:35588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZ8v4-0001Or-9w for submit@debbugs.gnu.org; Sun, 01 Nov 2020 03:40:58 -0500 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:39955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZ8uz-0001Oa-Sz for 44236@debbugs.gnu.org; Sun, 01 Nov 2020 03:40:56 -0500 X-Originating-IP: 91.129.102.160 Original-Received: from mail.gandi.net (m91-129-102-160.cust.tele2.ee [91.129.102.160]) (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id E28FA1C0004; Sun, 1 Nov 2020 08:40:46 +0000 (UTC) In-Reply-To: <87h7q98p4q.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 01 Nov 2020 10:20:20 +0200") 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:192337 Archived-At: > For a long time my customization contained > > (setq dired-listing-switches "-Alv --block-size='1") > > that in Dired buffers displays file sizes using nice space > as the thousands separator between groups of 3 digit. > > But now this clean space between numbers is polluted by visual garbage > of unrequested highlighted underlines. For example, gnus-article-mode disables this highlighting in read-only buffers with: ;; Prevent Emacs from displaying non-break space with ;; `nobreak-space' face. (set (make-local-variable 'nobreak-char-display) nil) But still in Dired buffers this highlighting is useful to see bad characters in file names. Whereas such highlighting makes no sense in file sizes. > Using 'C-u C-x =' on the character shows that it's NARROW NO-BREAK SPACE > with the nobreak-space face on it. It displays this information with this patch: diff --git a/lisp/descr-text.el b/lisp/descr-text.el index ec9a968013..075cb21c21 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -687,7 +687,8 @@ describe-char (save-excursion (goto-char pos) (looking-at-p "[ \t]+$"))) 'trailing-whitespace) - ((and nobreak-char-display char (eq char '#xa0)) + ((and nobreak-char-display char + (eq (get-char-code-property char 'general-category) 'Zs)) 'nobreak-space) ((and nobreak-char-display char (memq char '(#xad #x2010 #x2011)))