[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: highlighting non-ASCII characters
From: |
Ted Zlatanov |
Subject: |
Re: highlighting non-ASCII characters |
Date: |
Tue, 23 Mar 2010 20:03:02 -0500 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
On Tue, 23 Mar 2010 20:45:48 -0400 Stefan Monnier <address@hidden> wrote:
SM> What I'm saying is that there are two issues: non-ASCII chars in general
SM> (which I personally don't want to display in any special manner:
SM> they're just as normal as ASCII chars), and then there are "chars that
SM> are out of place or that may not be what they look like", such as the
SM> weird "K" in the other message's "OK" (which to me, is similar to the
SM> NBSP char in that it is meant to be displayed in the same way as some
SM> other char, so we want to call the attention of the user to the
SM> difference).
...
SM> I don't insist on using escape-glyph for those chars, indeed (I don't
SM> really care which face is used for them). What I care about is figuring
SM> out how to define programmatically "chars that are out of place or that
SM> may not be what they look like".
How about this:
show-nonascii-characters: t, 'majority-paragraph, majority-line,
'minority-line, 'minority-paragraph,
'suspicious, a function, or nil (default)
show-nonascii-characters-face: customizable from a list of presets,
escape-glyph, or a custom face
The rules:
t = always
majority-paragraph = highlight when they are 0-90% of the paragraph
majority-line = ditto for the line
minority-line = highlight when they are 0-20% of the line
minority-paragraph = ditto for the paragraph
suspicious = 3-5 characters per visual line
function = passed a list of regions of non-ASCII characters
nil = the default, don't highlight
I'm sure we'll tune this but as someone who writes non-ASCII characters
a lot, this would make sense. I'd personally use t but I can see how
that could be annoying. I think you're in favor of 'suspicious.
The idea is to make this easy to set up and available in any mode or
globally. It's easy for an experienced user to set up something
atrocious, but good choices for the colors and the rules are, I think,
the tricky and valuable part.
Ted
- face for non-ASCII characters (was: Translation of http status code to text), (continued)
- Re: face for non-ASCII characters, Florian Beck, 2010/03/23
- Re: Translation of http status code to text, Miles Bader, 2010/03/23
- highlighting non-ASCII characters (was: Translation of http status code to text), Ted Zlatanov, 2010/03/23
- RE: highlighting non-ASCII characters (was: Translation of http statuscode to text), Drew Adams, 2010/03/23
- Re: highlighting non-ASCII characters, Stefan Monnier, 2010/03/23
- RE: highlighting non-ASCII characters, Drew Adams, 2010/03/23
- Re: highlighting non-ASCII characters, Stefan Monnier, 2010/03/23
- Re: highlighting non-ASCII characters,
Ted Zlatanov <=
- Re: highlighting non-ASCII characters, Stefan Monnier, 2010/03/23
- Re: highlighting non-ASCII characters, Eli Zaretskii, 2010/03/24
- Re: highlighting non-ASCII characters, Jason Rumney, 2010/03/24
- Re: highlighting non-ASCII characters, Stefan Monnier, 2010/03/24
- Re: highlighting non-ASCII characters, Jason Rumney, 2010/03/24
- Re: highlighting non-ASCII characters, Ted Zlatanov, 2010/03/24
- Re: highlighting non-ASCII characters, Ted Zlatanov, 2010/03/24
- Re: highlighting non-ASCII characters, Lennart Borgman, 2010/03/24
- Re: highlighting non-ASCII characters, Lennart Borgman, 2010/03/24
- Re: highlighting non-ASCII characters, Ted Zlatanov, 2010/03/26