From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: non-break-space in tutorial Date: Tue, 07 Jun 2005 18:33:43 +0300 Organization: JURTA Message-ID: <873bruw4nw.fsf@jurta.org> References: <87y8a1o9u0.fsf-monnier+emacs@gnu.org> <87acmgubin.fsf@jurta.org> <87ll5yqbya.fsf@jurta.org> <87mzq3r70q.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1118160000 11636 80.91.229.2 (7 Jun 2005 16:00:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 7 Jun 2005 16:00:00 +0000 (UTC) Cc: emacs-devel@gnu.org, miles@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 07 17:59:56 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DfgS2-00010B-FY for ged-emacs-devel@m.gmane.org; Tue, 07 Jun 2005 17:57:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DfgYZ-0004Cj-LN for ged-emacs-devel@m.gmane.org; Tue, 07 Jun 2005 12:03:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DfgWH-0003Ul-Fk for emacs-devel@gnu.org; Tue, 07 Jun 2005 12:01:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DfgWG-0003Ts-9C for emacs-devel@gnu.org; Tue, 07 Jun 2005 12:01:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DfgWG-0003To-4k for emacs-devel@gnu.org; Tue, 07 Jun 2005 12:01:36 -0400 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DfgUQ-0008LN-Cf; Tue, 07 Jun 2005 11:59:42 -0400 Original-Received: from mail.neti.ee (80-235-42-112-dsl.mus.estpak.ee [80.235.42.112]) by Relayhost1.neti.ee (Postfix) with ESMTP id A058F8DD5; Tue, 7 Jun 2005 18:56:12 +0300 (EEST) Original-To: snogglethorpe@gmail.com In-Reply-To: (Miles Bader's message of "Tue, 7 Jun 2005 09:17:45 +0900") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:38264 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38264 > 1) Faces are global, but it's extremely desirable to disable special > treatment of NBSP (etc) on a per-buffer basis. So we can't get rid of > `show-nonbreak-escape'. I've already thought about the need to retain `show-nonbreak-escape'. That is why I used the renamed variable name in my previous mail. So with the lack of support for buffer-local faces and with changed treatment of `show-nonbreak-escape' we should rename this variable to something like `show-no-break-space'. > 2) The original treatment of NBSP -- displaying it like a normal > escape character, with backslash prefix and in the normal escape > character face -- is IMO better than your method, so _at the least_ it > should be user selectable, but it seems that your patch makes this > impossible. [And I personally think it should be the default.] I've seen various texts with a lot of non-breaking spaces. Additional backslashes render such texts almost unreadable. Since we can't predict in which context and modes users might encounter non-breaking spaces, we should make their default highlighting as least annoying as possible. > 3) Your patch treats "soft hyphens" in the same way as NBSP, and I'm > not sure this is desirable; it at least seems worthy of discussion. It treats soft hyphens as NBSP only in regard of not adding a escape character. Their faces are different: soft hyphens are displayed in `escape-glyph', but NBSP in `no-break-space'. I think from the user's POV this should be fine. I'm still not sure about the need for a separate user option (e.g. `show-soft-hyphen') for configuring the display of soft hypens. > BTW, something funny I noticed while testing, though I'm not sure > whether it is caused by your patch or not, is that when displaying on > a tty with `terminal-coding-system' set to nil, both NBSP and > soft-hyphen are show as "?". Since most fonts simply display these > character in the same way as their non-special brothers, wouldn't be > good for emacs to do the translation itself so that they show up ok on > simple ascii terminals? It is caused by the 2005-03-24 change in xdisp.c: { XSETINT (it->ctl_chars[0], escape_glyph); - g = it->c == 0x8ad ? '-' : ' '; + g = it->c; XSETINT (it->ctl_chars[1], g); ctl_len = 2; goto display_control; which now doesn't replace the NBSP by an SPC. Maybe this line should be restored for ascii terminals? -- Juri Linkov http://www.jurta.org/emacs/