unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Gnus not escaping NBSP and soft-hyphen
@ 2005-06-21 16:58 Gaëtan LEURENT
  2005-06-21 18:38 ` Paul Pogonyshev
  0 siblings, 1 reply; 15+ messages in thread
From: Gaëtan LEURENT @ 2005-06-21 16:58 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 793 bytes --]

Hi,

I noticed that when displaying messages in Gnus, the NBSP and soft-hypen
are just displayed as normal space and hyphen instead of being prefixed
with an escape character (or NBSP being displayed as underlined as in
the recent CVS).

Step to reproduce:

- Start emacs CVS with: emacs -Q -f gnus
- Create a group from the attached file with: G f
- Enter the group and look at the message

In the summary buffer NBSP and soft-hypen are correctly escaped, but in
the Article buffer they are not.

I also noticed the same behavior when visiting the file with
M-x find-file-literally, but maybe this one is a feature ?

The same happens with a CVS emacs from 2005-05-20, so it doesn't seem to
be related to the latest changes in the display of NBSP.

-- 
Gaëtan LEURENT

[-- Attachment #2: RMAIL file to test NBSP and soft-hypen display --]
[-- Type: application/octet-stream, Size: 670 bytes --]

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Gnus not escaping NBSP and soft-hyphen
  2005-06-21 16:58 Gnus not escaping NBSP and soft-hyphen Gaëtan LEURENT
@ 2005-06-21 18:38 ` Paul Pogonyshev
  2005-06-21 19:21   ` Gaëtan LEURENT
  0 siblings, 1 reply; 15+ messages in thread
From: Paul Pogonyshev @ 2005-06-21 18:38 UTC (permalink / raw)


Gaëtan LEURENT wrote:
> Hi,
>
> I noticed that when displaying messages in Gnus, the NBSP and soft-hypen
> are just displayed as normal space and hyphen instead of being prefixed
> with an escape character (or NBSP being displayed as underlined as in
> the recent CVS).

I don't know if it is a bug or a feature, but why would you possibly want
to see non-breaking spaces in your messages?  I sort of want to read my
mail, not investigate the typographic peculiarities in it.

I'd say it makes perfect sense to not escape special characters in text
meant to be read and hardly ever edited.

Paul

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Gnus not escaping NBSP and soft-hyphen
  2005-06-21 18:38 ` Paul Pogonyshev
@ 2005-06-21 19:21   ` Gaëtan LEURENT
  2005-06-21 21:30     ` Stefan Monnier
  0 siblings, 1 reply; 15+ messages in thread
From: Gaëtan LEURENT @ 2005-06-21 19:21 UTC (permalink / raw)
  Cc: emacs-devel


Paul Pogonyshev wrote on 21 Jun 2005 20:38:47 +0200:

> I don't know if it is a bug or a feature, but why would you possibly want
> to see non-breaking spaces in your messages?  I sort of want to read my
> mail, not investigate the typographic peculiarities in it.

Well, I guess it's not a common situation, but I read some local
newsgroups where part of the game is to impersonate one-another. As it's
in French, some users use NBSP before double punctuation marks (':',
';', '!', '?' -- in French typography they are supposed to be preceded
by a thin space) and it's a nice way to detect impersonations.

> I'd say it makes perfect sense to not escape special characters in text
> meant to be read and hardly ever edited.

Yes, that would be nice, but it doesn't seem to be case today. Those
special characters are escaped in Help buffers, and in Gnus Summary ...

-- 
Gaëtan LEURENT

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Gnus not escaping NBSP and soft-hyphen
  2005-06-21 19:21   ` Gaëtan LEURENT
@ 2005-06-21 21:30     ` Stefan Monnier
  2005-06-21 22:41       ` Gaëtan LEURENT
  0 siblings, 1 reply; 15+ messages in thread
From: Stefan Monnier @ 2005-06-21 21:30 UTC (permalink / raw)
  Cc: Paul Pogonyshev

>> I don't know if it is a bug or a feature,

It's a feature.  I couldn't stand reading the NBSP-escaping in some French
articles where half the spaces are NBSP.  NBSP-escaping is good in
prog-lang buffers, not in Gnus's artcle buffer.

>> I'd say it makes perfect sense to not escape special characters in text
>> meant to be read and hardly ever edited.

> Yes, that would be nice, but it doesn't seem to be case today.  Those
> special characters are escaped in Help buffers, and in Gnus Summary ...

Indeed the feature has not been included in Help buffers and Gnus summary
yet.  Mostly because I've never bumped into an NBSP in a Help buffer or in
a Gnus summary.


        Stefan

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Gnus not escaping NBSP and soft-hyphen
  2005-06-21 21:30     ` Stefan Monnier
@ 2005-06-21 22:41       ` Gaëtan LEURENT
  2005-06-22  0:14         ` Miles Bader
  2005-06-22 13:32         ` Juri Linkov
  0 siblings, 2 replies; 15+ messages in thread
From: Gaëtan LEURENT @ 2005-06-21 22:41 UTC (permalink / raw)
  Cc: Paul Pogonyshev, emacs-devel


Stefan Monnier wrote on 21 Jun 2005 23:30:07 +0200:

> It's a feature.  I couldn't stand reading the NBSP-escaping in some French
> articles where half the spaces are NBSP.  NBSP-escaping is good in
> prog-lang buffers, not in Gnus's artcle buffer.

That makes sense, but I'd rather have the NBSP escaped everywhere.
Is there any way to disable this feature ?

> Indeed the feature has not been included in Help buffers and Gnus summary
> yet.  Mostly because I've never bumped into an NBSP in a Help buffer or in
> a Gnus summary.

I see NBSP in the Gnus summary buffer when some subject contains
NBSP. In Help buffers, there are some in C-h C-\ latin-1-prefix.

Maybe a more systematic way to proceed would be to disable NBSP-escaping
in read-only buffers (but it could sometimes be confusing, too).

-- 
Gaëtan LEURENT

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Gnus not escaping NBSP and soft-hyphen
  2005-06-21 22:41       ` Gaëtan LEURENT
@ 2005-06-22  0:14         ` Miles Bader
  2005-06-22 13:32         ` Juri Linkov
  1 sibling, 0 replies; 15+ messages in thread
From: Miles Bader @ 2005-06-22  0:14 UTC (permalink / raw)
  Cc: Stefan Monnier, Paul Pogonyshev

On 6/22/05, Gaëtan LEURENT <gaetan.leurent@ens.fr> wrote:
> Maybe a more systematic way to proceed would be to disable NBSP-escaping
> in read-only buffers (but it could sometimes be confusing, too).

Yes, I think that would be a mistake.  For better or worse, it really
does seem to be something which is dependent on the type of the
buffer, and that's something that can only be decided by each mode
individually.

-Miles
-- 
Do not taunt Happy Fun Ball.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Gnus not escaping NBSP and soft-hyphen
  2005-06-21 22:41       ` Gaëtan LEURENT
  2005-06-22  0:14         ` Miles Bader
@ 2005-06-22 13:32         ` Juri Linkov
  2005-06-23  0:43           ` Miles Bader
  1 sibling, 1 reply; 15+ messages in thread
From: Juri Linkov @ 2005-06-22 13:32 UTC (permalink / raw)
  Cc: monnier, pogonyshev

> Maybe a more systematic way to proceed would be to disable NBSP-escaping
> in read-only buffers (but it could sometimes be confusing, too).

Disabling NBSP highlighting in read-only buffers makes some sense.
The reason is that in read-only buffers users usually can't fix NBSP
(if it is wrong).  I used such a rule for enabling show-trailing-whitespace
to show trailing whitespace only in editable buffers.  But sometimes
this rule fails: some read-only buffers can be switched to edit mode,
some editable buffers are not writable.  So finally I reached the rule
that sets the buffer-local show-trailing-whitespace only on files in
specified subdirectories.

This shows that show-trailing-whitespace is flexible enough to allow arbitrary
customization, but escape-glyph is not.  There is a need for a buffer-local
variable similar to show-trailing-whitespace to enable/disable highlighting
of control characters and nbsp with escape-glyph face on a per-buffer basis.

-- 
Juri Linkov
http://www.jurta.org/emacs/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Gnus not escaping NBSP and soft-hyphen
  2005-06-22 13:32         ` Juri Linkov
@ 2005-06-23  0:43           ` Miles Bader
  2005-06-23 17:37             ` Kevin Rodgers
  2005-06-24 19:07             ` Juri Linkov
  0 siblings, 2 replies; 15+ messages in thread
From: Miles Bader @ 2005-06-23  0:43 UTC (permalink / raw)
  Cc: pogonyshev, monnier, emacs-devel

On 6/22/05, Juri Linkov <juri@jurta.org> wrote:
> This shows that show-trailing-whitespace is flexible enough to allow arbitrary
> customization, but escape-glyph is not.  There is a need for a buffer-local
> variable similar to show-trailing-whitespace to enable/disable highlighting
> of control characters and nbsp with escape-glyph face on a per-buffer basis.

What's wrong with `show-nonbreak-space'?

BTW, the variable-name (show-nonbreak-space) and the face
(no-break-space) should use consistent terminology (I prefer
"no-break" myself, but...).

Also, there seems to be a bug in that though -- non-nil, non-t values
of `show-nonbreak-space' switch to "show preceding escape-character
mode" for NBSP, but _turn off_ the preceding escape character for
soft-hyphen characters!

-miles
-- 
Do not taunt Happy Fun Ball.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Gnus not escaping NBSP and soft-hyphen
  2005-06-23  0:43           ` Miles Bader
@ 2005-06-23 17:37             ` Kevin Rodgers
  2005-06-24 16:37               ` Richard M. Stallman
  2005-06-24 19:07             ` Juri Linkov
  1 sibling, 1 reply; 15+ messages in thread
From: Kevin Rodgers @ 2005-06-23 17:37 UTC (permalink / raw)


Miles Bader wrote:
 > BTW, the variable-name (show-nonbreak-space) and the face
 > (no-break-space) should use consistent terminology (I prefer
 > "no-break" myself, but...).

Yes, the Unicode name for that character is NO-BREAK SPACE.

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Gnus not escaping NBSP and soft-hyphen
  2005-06-23 17:37             ` Kevin Rodgers
@ 2005-06-24 16:37               ` Richard M. Stallman
  2005-06-24 17:17                 ` Kevin Rodgers
  2005-06-24 19:07                 ` Juri Linkov
  0 siblings, 2 replies; 15+ messages in thread
From: Richard M. Stallman @ 2005-06-24 16:37 UTC (permalink / raw)
  Cc: emacs-devel

    Yes, the Unicode name for that character is NO-BREAK SPACE.

I just changed everything to "nobreak space" because (ISTR)
someone said the Unicode name had no hyphen.  Which way is the
Unicode name written?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Gnus not escaping NBSP and soft-hyphen
  2005-06-24 16:37               ` Richard M. Stallman
@ 2005-06-24 17:17                 ` Kevin Rodgers
  2005-06-24 19:07                 ` Juri Linkov
  1 sibling, 0 replies; 15+ messages in thread
From: Kevin Rodgers @ 2005-06-24 17:17 UTC (permalink / raw)
  Cc: emacs-devel

"Richard M. Stallman" <rms@gnu.org> wrote:
>     Yes, the Unicode name for that character is NO-BREAK SPACE.
> 
> I just changed everything to "nobreak space" because (ISTR)
> someone said the Unicode name had no hyphen.  Which way is the
> Unicode name written?

It is NO-BREAK SPACE: http://www.unicode.org/charts/PDF/U0080.pdf
(on page 427, i.e. page 3 of 6 of that chart).

-- 
Kevin Rodgers



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Gnus not escaping NBSP and soft-hyphen
  2005-06-24 16:37               ` Richard M. Stallman
  2005-06-24 17:17                 ` Kevin Rodgers
@ 2005-06-24 19:07                 ` Juri Linkov
  2005-06-25 13:34                   ` Richard M. Stallman
  1 sibling, 1 reply; 15+ messages in thread
From: Juri Linkov @ 2005-06-24 19:07 UTC (permalink / raw)
  Cc: ihs_4664, emacs-devel

>     Yes, the Unicode name for that character is NO-BREAK SPACE.
>
> I just changed everything to "nobreak space" because (ISTR)
> someone said the Unicode name had no hyphen.  Which way is the
> Unicode name written?

The Unicode name is NO-BREAK SPACE (and the old Unicode name is
NON-BREAKING SPACE).

Creating a Lisp symbol requires converting the space into the hyphen.
Leaving the second already existing hyphen makes the symbol name
`no-break-space' ambiguous since the user might interpret it as
`no (break space)' with the unknown term `break space'.

Removing the existing hyphen and adding other one instead of the space
makes the resulting name `nobreak-space' unambiguous.

But perhaps the cindex name in the Emacs manual should be the same as
the Unicode name:

@vindex nobreak-char-display
@cindex no-break space, display
@cindex soft hyphen, display

-- 
Juri Linkov
http://www.jurta.org/emacs/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Gnus not escaping NBSP and soft-hyphen
  2005-06-23  0:43           ` Miles Bader
  2005-06-23 17:37             ` Kevin Rodgers
@ 2005-06-24 19:07             ` Juri Linkov
  2005-06-24 22:22               ` Miles Bader
  1 sibling, 1 reply; 15+ messages in thread
From: Juri Linkov @ 2005-06-24 19:07 UTC (permalink / raw)
  Cc: pogonyshev, emacs-devel, monnier, miles

>> This shows that show-trailing-whitespace is flexible enough to allow arbitrary
>> customization, but escape-glyph is not.  There is a need for a buffer-local
>> variable similar to show-trailing-whitespace to enable/disable highlighting
>> of control characters and nbsp with escape-glyph face on a per-buffer basis.
>
> What's wrong with `show-nonbreak-space'?

I thought that two new face variables (e.g. `escape-glyph-face' and
`nobreak-space-face') would be useful to imitate buffer-local faces.
I guess users might want to use different faces for control characters
or nbsp in different buffers, or to set `escape-glyph-face' to the default
face to not highlight control characters in some buffers.

-- 
Juri Linkov
http://www.jurta.org/emacs/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Gnus not escaping NBSP and soft-hyphen
  2005-06-24 19:07             ` Juri Linkov
@ 2005-06-24 22:22               ` Miles Bader
  0 siblings, 0 replies; 15+ messages in thread
From: Miles Bader @ 2005-06-24 22:22 UTC (permalink / raw)
  Cc: pogonyshev, emacs-devel, monnier, miles

> >> This shows that show-trailing-whitespace is flexible enough to allow arbitrary
> >> customization, but escape-glyph is not.  There is a need for a buffer-local
> >> variable similar to show-trailing-whitespace to enable/disable highlighting
> >> of control characters and nbsp with escape-glyph face on a per-buffer basis.
> >
> > What's wrong with `show-nonbreak-space'?
> 
> I thought that two new face variables (e.g. `escape-glyph-face' and
> `nobreak-space-face') would be useful to imitate buffer-local faces.
> I guess users might want to use different faces for control characters
> or nbsp in different buffers, or to set `escape-glyph-face' to the default
> face to not highlight control characters in some buffers.

A "face variable" isn't flexible enough, as it wouldn't allow the
"preceeding escape character" variant.   As for normal
escape-characters, why are they important enough to warrant a separate
variable controlling their appearance?  Typical "pretty" text doesn't
contain them at all (and if they occur, it's an error).

-Miles
-- 
Do not taunt Happy Fun Ball.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Gnus not escaping NBSP and soft-hyphen
  2005-06-24 19:07                 ` Juri Linkov
@ 2005-06-25 13:34                   ` Richard M. Stallman
  0 siblings, 0 replies; 15+ messages in thread
From: Richard M. Stallman @ 2005-06-25 13:34 UTC (permalink / raw)
  Cc: ihs_4664, emacs-devel

    But perhaps the cindex name in the Emacs manual should be the same as
    the Unicode name:

    @vindex nobreak-char-display
    @cindex no-break space, display
    @cindex soft hyphen, display

I did that.  Thanks.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2005-06-25 13:34 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-21 16:58 Gnus not escaping NBSP and soft-hyphen Gaëtan LEURENT
2005-06-21 18:38 ` Paul Pogonyshev
2005-06-21 19:21   ` Gaëtan LEURENT
2005-06-21 21:30     ` Stefan Monnier
2005-06-21 22:41       ` Gaëtan LEURENT
2005-06-22  0:14         ` Miles Bader
2005-06-22 13:32         ` Juri Linkov
2005-06-23  0:43           ` Miles Bader
2005-06-23 17:37             ` Kevin Rodgers
2005-06-24 16:37               ` Richard M. Stallman
2005-06-24 17:17                 ` Kevin Rodgers
2005-06-24 19:07                 ` Juri Linkov
2005-06-25 13:34                   ` Richard M. Stallman
2005-06-24 19:07             ` Juri Linkov
2005-06-24 22:22               ` Miles Bader

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).