From: Juri Linkov <juri@jurta.org>
Cc: emacs-devel@gnu.org, miles@gnu.org
Subject: Re: non-break-space in tutorial
Date: Tue, 07 Jun 2005 18:33:43 +0300 [thread overview]
Message-ID: <873bruw4nw.fsf@jurta.org> (raw)
In-Reply-To: <fc339e4a050606171760c30bdf@mail.gmail.com> (Miles Bader's message of "Tue, 7 Jun 2005 09:17:45 +0900")
> 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/
next prev parent reply other threads:[~2005-06-07 15:33 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-26 23:19 non-break-space in tutorial Stefan Monnier
2005-05-27 11:57 ` Juri Linkov
2005-05-27 13:07 ` Paul Pogonyshev
2005-05-28 11:53 ` Richard Stallman
2005-05-29 16:08 ` Juri Linkov
2005-05-29 17:40 ` Eli Zaretskii
2005-05-30 8:48 ` Juri Linkov
2005-05-30 16:08 ` Eli Zaretskii
2005-05-31 4:18 ` Richard Stallman
2005-05-31 5:17 ` Miles Bader
2005-05-31 8:56 ` Kim F. Storm
2005-05-31 17:47 ` Richard Stallman
2005-06-06 12:52 ` Juri Linkov
2005-06-06 14:07 ` Stefan Monnier
2005-06-07 0:17 ` Miles Bader
2005-06-07 15:33 ` Juri Linkov [this message]
2005-06-07 17:12 ` Daniel Brockman
2005-06-08 0:59 ` Juri Linkov
2005-06-08 2:22 ` Henrik Enberg
2005-06-07 22:31 ` Miles Bader
2005-06-07 23:12 ` Gaëtan LEURENT
2005-06-07 23:53 ` Miles Bader
2005-06-08 0:01 ` Luc Teirlinck
2005-06-08 0:17 ` Miles Bader
2005-06-08 23:29 ` Gaëtan LEURENT
2005-06-08 23:57 ` Juri Linkov
2005-06-07 23:52 ` Juri Linkov
2005-06-08 0:17 ` Miles Bader
2005-06-08 0:57 ` Juri Linkov
2005-06-08 2:37 ` Miles Bader
2005-06-08 8:35 ` Kim F. Storm
2005-06-08 8:53 ` Miles Bader
2005-06-08 16:05 ` Stefan Monnier
2005-06-08 20:47 ` Juri Linkov
2005-06-08 21:25 ` Kim F. Storm
2005-06-08 22:53 ` Stefan Monnier
2005-06-09 14:40 ` Richard Stallman
2005-06-09 15:29 ` David Kastrup
2005-06-09 16:44 ` Juanma Barranquero
2005-05-28 11:53 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873bruw4nw.fsf@jurta.org \
--to=juri@jurta.org \
--cc=emacs-devel@gnu.org \
--cc=miles@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).