[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: whitespace includes U+3000

From: Richard Stallman
Subject: Re: whitespace includes U+3000
Date: Thu, 29 Jun 2006 13:57:34 -0400

    Then we have different meanings in "whitespace"; the set of
    characters that have "whitespace" syntax is different from
    the set of characters that are displayed by "whitespace"

That's right.  There is "characters that would print as whitespace"
and there is "characters that would display as whitespace in Emacs."
These are different for good reason; it is not a mistake that they
are different.

Maybe we need to clarify the documentation so that people will
understand that there are two different concepts of whitespace.

In theory we might want to use two different words for these concepts.
But that seems strained and difficult.  They really are two applications
of of the standard concept of "whitespace".  We might want to speak of
"screen whitespace" and "text whitespace".

            And, we can't use "whitespace" syntax at least for

Yes, that is true.

    > You can probably get this result by putting NBSP into the pattern
    > for show-trailing-whitespace to recognize.  Redisplay will override
    > the face, for the NBSP.

    What do you mean by "pattern" here?  Regular expression?

Yes, I assumed it used one.

However, on second thought, I've concluded that
show-trailing-whitespace doesn't need to know about NBSP at all.
Since NBSP is now indicated on the screen by a color, it is no longer
likely to go unnoticed.  So there is no problem with NBSP and

show-trailing-whitespace ought to know about all characters that will
be indistinguishable on the screen from "end of the line".

    By the way, I've just found that currently the special face
    for NBSP is overriden by show-trailing-whitespace.

Do you mean, show-trailing-whitespace would override the special face
for NBSP _if_ you modify it to recognize NBSP along with SPC and TAB?
That means my expectation was mistaken; I stand corrected.

But since show-trailing-whitespace does not need to recognize NBSP,
this isn't a _problem_.

    Anyway, Unicode has lots more space-like characters
    (e.g. U+2000..U+200B).  Should them be treated by the same
    way as NBSP (i.e. displayed with nobreak-face)?  Or as

It depends how they are used.  How does Emacs display them?

    How about the case of fixup-whitespace?  It seems that this
    function should delete only TAB and SPACE.  So, here we have
    the third meaning of "whitespace"; just TAB and SPACE.

It is an interesting question what fixup-whitespace should do with
NBSP.  I am not sure; it depends on how NBSP is used.

When the existing space is just one NBSP, fixup-whitespace should not
change it.

Do people use multiple NBSP to force more space between two words?
If so, maybe fixup-whitespace should leave that untouched.  Or maybe
fixup-whitespace should convert a run of NBSP to a single NBSP.

When there is a series of whitespace including NBSP and SPC (or TAB),
the runs of ordinary whitespace should be compacted to a single SPC,
and the runs of NBSP should be treated as above.

Similar reasoning needs to be applied to other kinds of whitespace, to
figure out what behavior users will really find useful and helpful in

    How about the case of delete-trailing-whitespace?

That is meant to get rid of junk.  It should probably delete
NBSP just like SPC and TAB, since that is useless at the end of a line.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]