unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3452: 23.0.94; display
@ 2009-06-03  2:53 Richard Stallman
  0 siblings, 0 replies; 16+ messages in thread
From: Richard Stallman @ 2009-06-03  2:53 UTC (permalink / raw)
  To: emacs-pretest-bug

Visiting the file foo.msg after emacs -Q in a 37-line Linux terminal
garbles the screen, including the mode line and menu bar.
I last updated the source on May 26.

begin 666 foo.msg
M6"U3<&%M+5-T871U<SH@3F\L('-C;W)E/2TP+C4@<F5Q=6ER960]-2XP('1E
M<W1S/4%73"Q"05E%4U\P,"P*"49/4D=%1%]20U9$7TA%3$\L34E-15]"05-%
M-C1?3D]?3D%-12Q.3U]214%,7TY!344L"@E354)*14-47T5.0T]$141?5%=)
M0T4@875T;VQE87)N/6YO('9E<G-I;VX],RXQ+C`*1&%T93H@5'5E+"`P,B!*
M=6X@,C`P.2`Q,CHQ,SHS."`K,#,P,`I4;SH@96X@/&$M:6YF;W,M96Y`86EN
M9F]S+F-A/@I-97-S86=E+6ED.B`\-$$R-$5$-#(N-C`T,#0P.$!N971V:7-I
M;VXN;F5T+FEL/@I-24U%+79E<G-I;VXZ(#$N,`I&<F]M.B!A+6EN9F]S+65N
M0&%I;F9O<RYC80I3=6)J96-T.B`H96XI(#T_=71F+3@_<3]#86QL7V9O<E]3
M=6UM97)?;V9?4F5S:7-T86YC93U%,CTX,#U!1%\]13(].#`]04,R,#\]"B`]
M/W5T9BTX/W$_,#D]13(].#`]040J7T-O;&QA<'-E7W1H95]S96-U<FET>5]A
M<F-H:71E8W1U<F5S/44R/3@P/4%$(3\]"B`]/W5T9BTX/V(_-&]#<S\]"E)E
M<&QY+51O.B!A+6EN9F]S+65N0&%I;F9O<RYC80I#;VYT96YT+51Y<&4Z('1E
M>'0O<&QA:6X[(&-H87)S970](G5T9BTX(@H*"D%G86EN<W0@3D%43RP@1S(P
M+"!'."P@1G)O;G1E>"!A;F0@=&AE(.*`G%-T;V-K:&]L;2!0<F]G<F%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=71S8V@Z('=W=RYG:7!F96QS;VQI+F]R9R](;VUE+S8S.30N:'1M;`H@("`@
M("H@9G)A;F-A:7,Z('=W=RYG:7!F96QS;VQI+F]R9R](;VUE+S8S.34N:'1M
M;`H@("`@("H@:71A;&EA;F\@=W=W+F=I<&9E;'-O;&DN;W)G+TAO;64O-C0P
M-"YH=&UL"B`@("`@*B!S=F5N<VMA.B!W=W<N;6]T:W)A9G0N;F5T+VYY:&5T
M97(O,S0X,PH@("`@("H@<W5O;65K<VD@:'1T<#HO+W1A:VMU+FYE="]A<G1I
M8VQE+G!H<"\R,#`Y,#0P-#$P,S,T.3$R-@H]/3T]/3T]/3T]/3T]"BH@06X@
M86YT:6%U=&AO<FET87)I86X@86YT:6-A<&ET86QI<W0@:6YI=&EA=&EV90I?
M7U]?7U]?7U]?7U]?7U]?7U]?7U]?7U]?7U]?7U]?7U]?7U]?7U]?7PI!("T@
M22!.($8@3R!3("!.($4@5R!3("!3($4@4B!6($D@0R!%"D)Y+"!&;W(L(&%N
M9"!!8F]U="!!;F%R8VAI<W1S"E-E;F0@;F5W<R!R97!O<G1S('1O($$M:6YF
M;W,M96X@;6%I;&EN9R!L:7-T"D$M:6YF;W,M96Y`86EN9F]S+F-A"E-U8G-C
M<FEB92]5;G-U8G-C<FEB92!H='1P.B\O86EN9F]S+F-A+V-G:2UB:6XO;6%I
M;&UA;B]L:7-T:6YF;R]A+6EN9F]S+65N"D%R8VAI=F4Z(&AT='`Z+R]A:6YF
(;W,N8V$O96X`
`
end



In GNU Emacs 23.0.94.1 (mipsel-unknown-linux-gnu, GTK+ Version 2.12.12)
 of 2009-05-27 on theobromine2
configured using `configure  'CFLAGS=-O0 -g -Wno-pointer-sign' 'mipsel-unknown-linux-gnu' 'build_alias=mipsel-unknown-linux-gnu' 'host_alias=mipsel-unknown-linux-gnu' 'target_alias=mipsel-unknown-linux-gnu''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: RMAIL

Minor modes in effect:
  gpm-mouse-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
n l y SPC r e s p p j DEL DEL o n d SPC w i t h SPC 
" m a y b e " . RET I SPC d o n ' t SPC k n o w SPC 
w h e t h e r SPC t h e s e SPC ESC DEL C-a C-k I SPC 
c a n n o t SPC j u d g e SPC DEL , SPC b a s e d SPC 
o n SPC t h e SPC a m o u n t SPC o f SPC l i c ESC 
DEL ESC DEL ESC DEL ESC DEL w h a t SPC y o u SPC h 
a v e SPC s a i d , SPC w h e t h e r SPC I SPC w o 
u d l SPC c o n s i d e r ESC b C-b C-b C-t C-e RET 
t h i s SPC g o o d SPC o r SPC b a . DEL d . SPC SPC 
I SPC c a n ESC / ESC SPC ESC / SPC w h ESC / ESC SPC 
ESC / ESC SPC ESC DEL t h e y SPC w o u l d SPC b e 
SPC ESC b ESC b ESC b ESC d i t C-e a SPC f r e e SPC 
l i c e n s e . RET C-c C-c d x C-l C-x h ESC x w r 
SPC r e RET f o o . m s g RET C-x C-f ESC p RET C-l 
ESC x C-g C-x k RET ESC x r e p o r t SPC e m a c TAB 
RET

Recent messages:
Auto-saving...done
Mark set [2 times]
Auto-saving...done
Sending...
Wrote /home/rms/outgoing/out-56
Sending...done
No following nondeleted message
Expunging deleted messages...done
Mark set [2 times]
Wrote /home/rms/foo.msg
Quit





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

* bug#3452: 23.0.94; display
@ 2009-06-06  2:48 Chong Yidong
  0 siblings, 0 replies; 16+ messages in thread
From: Chong Yidong @ 2009-06-06  2:48 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 3452

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

Richard Stallman <rms@gnu.org> wrote: 

> Visiting the file foo.msg after emacs -Q in a 37-line Linux terminal
> garbles the screen, including the mode line and menu bar.

The problem stems from the character 8237 (#o20055, #x202d),
LEFT-TO-RIGHT OVERRIDE.  For some reason, the composition for this
character screws up line wrapping.

For a simpler test case, see the attached file.  The first line uses
character 8237 and is incorrectly wrapped; the second line uses spaces
and is correctly wrapped.

Handa-san, do you have an idea what the problem might be?  If not, I'll
try to debug.


[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 332 bytes --]

‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭‭AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA

                                                        BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB

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

* bug#3452: 23.0.94; display
@ 2009-06-07  3:47 Chong Yidong
  2009-06-07  9:16 ` Eli Zaretskii
  2009-06-08  1:51 ` Kenichi Handa
  0 siblings, 2 replies; 16+ messages in thread
From: Chong Yidong @ 2009-06-07  3:47 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 3452

> The problem stems from the character 8237 (#o20055, #x202d),
> LEFT-TO-RIGHT OVERRIDE.  For some reason, the composition for this
> character screws up line wrapping.

Hi Handa-san, I investigated some more.  Let me know what you think.

The entry for 8237 (#x202d) in char-width-table is 0: that is to say,
char-width-table reports that the composition has zero width.  This is
because of the following code in characters.el:

  (let ((l '((#x0300 . #x036F)
            ...
            (#x202A . #x202E)
            (#xE0001 . #xE01EF))))
    (dolist (elt l)
      (set-char-table-range char-width-table elt 0)))

The function fill_gstring_body in composite.c uses char-width-table.
However, composition_gstring_width for this character, called in
term.c:1830, returns 1.  This inconsistency leads to the bug.

Sure enough, if I do

  (aset char-width-table #x202d 1)

then the screen corruption goes away.

Maybe we should reconsider setting these characters to have zero-width
for char-width-table in characters.el, since fill-gstring-body seems to
handle zero-width compositions poorly.  WDYT?





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

* bug#3452: 23.0.94; display
  2009-06-07  3:47 bug#3452: 23.0.94; display Chong Yidong
@ 2009-06-07  9:16 ` Eli Zaretskii
  2009-06-07 13:56   ` Chong Yidong
  2009-06-07 20:41   ` Chong Yidong
  2009-06-08  1:51 ` Kenichi Handa
  1 sibling, 2 replies; 16+ messages in thread
From: Eli Zaretskii @ 2009-06-07  9:16 UTC (permalink / raw)
  To: Chong Yidong, 3452

> From: Chong Yidong <cyd@stupidchicken.com>
> Date: Sat, 06 Jun 2009 23:47:26 -0400
> Cc: 3452@emacsbugs.donarmstrong.com
> Reply-To: Chong Yidong <cyd@stupidchicken.com>, 3452@emacsbugs.donarmstrong.com
> 
> Sure enough, if I do
> 
>   (aset char-width-table #x202d 1)
> 
> then the screen corruption goes away.
> 
> Maybe we should reconsider setting these characters to have zero-width
> for char-width-table in characters.el, since fill-gstring-body seems to
> handle zero-width compositions poorly.  WDYT?

I think it would be a bad idea to set these characters to anything but
zero width.  These characters are not supposed to be displayed at all,
they have no meaningful glyphs to show them.  They are just directives
to the bidirectional display engines about how to convert logical
order of characters to visual order.

Not to mention the fact that the Unicode standard explicitly calls
them zero-width.

We should find a different way to handle this problem.

Btw, I don't understand how these characters are related to
compositions.  They should not be composed with anything, they always
stand for themselves.





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

* bug#3452: 23.0.94; display
  2009-06-07  9:16 ` Eli Zaretskii
@ 2009-06-07 13:56   ` Chong Yidong
  2009-06-07 14:30     ` Eli Zaretskii
  2009-06-07 20:41   ` Chong Yidong
  1 sibling, 1 reply; 16+ messages in thread
From: Chong Yidong @ 2009-06-07 13:56 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 3452

Eli Zaretskii <eliz@gnu.org> writes:

> Btw, I don't understand how these characters are related to
> compositions.  They should not be composed with anything, they always
> stand for themselves.

I didn't know that.  This means there is a bug in either
find_composition (called from composition_compute_stop_pos) or
next_element_from_composition (called from next_element_from_buffer),
because the following code in next_element_from_buffer (xdisp.c:6519) is
triggered for this character:

  if (CHAR_COMPOSED_P (it, IT_CHARPOS (*it), IT_BYTEPOS (*it))
      && next_element_from_composition (it))
    {
       return 1;
    }





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

* bug#3452: 23.0.94; display
  2009-06-07 13:56   ` Chong Yidong
@ 2009-06-07 14:30     ` Eli Zaretskii
  0 siblings, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2009-06-07 14:30 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 3452

> From: Chong Yidong <cyd@stupidchicken.com>
> Cc: 3452@emacsbugs.donarmstrong.com,  handa@m17n.org
> Date: Sun, 07 Jun 2009 09:56:05 -0400
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Btw, I don't understand how these characters are related to
> > compositions.  They should not be composed with anything, they always
> > stand for themselves.
> 
> I didn't know that.  This means there is a bug in either
> find_composition (called from composition_compute_stop_pos) or
> next_element_from_composition (called from next_element_from_buffer),
> because the following code in next_element_from_buffer (xdisp.c:6519) is
> triggered for this character:
> 
>   if (CHAR_COMPOSED_P (it, IT_CHARPOS (*it), IT_BYTEPOS (*it))
>       && next_element_from_composition (it))
>     {
>        return 1;
>     }

I hope Handa-san could shed some light on this issue.






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

* bug#3452: 23.0.94; display
  2009-06-07  9:16 ` Eli Zaretskii
  2009-06-07 13:56   ` Chong Yidong
@ 2009-06-07 20:41   ` Chong Yidong
  2009-06-07 22:53     ` Eli Zaretskii
  1 sibling, 1 reply; 16+ messages in thread
From: Chong Yidong @ 2009-06-07 20:41 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 3452

Eli Zaretskii <eliz@gnu.org> writes:

> Btw, I don't understand how these characters are related to
> compositions.  They should not be composed with anything, they always
> stand for themselves.

Actually, according to composition-function-table:

M-: (aref composition-function-table #x202d)

 => ([\c.\c^+ 1 compose-gstring-for-graphic]
     [nil 0 compose-gstring-for-graphic])

All zero-width characters are explicitly given non-nil entries in
composition-function-table, in composite.el:

(let ((elt '(["\\c.\\c^+" 1 compose-gstring-for-graphic]
             [nil 0 compose-gstring-for-graphic])))
  (map-char-table
   #'(lambda (key val)
       (if (= val 0)
           (set-char-table-range composition-function-table key elt)))
   char-width-table))





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

* bug#3452: 23.0.94; display
  2009-06-07 20:41   ` Chong Yidong
@ 2009-06-07 22:53     ` Eli Zaretskii
  0 siblings, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2009-06-07 22:53 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 3452

> From: Chong Yidong <cyd@stupidchicken.com>
> Cc: 3452@emacsbugs.donarmstrong.com,  handa@m17n.org
> Date: Sun, 07 Jun 2009 16:41:33 -0400
> 
> Actually, according to composition-function-table:
> 
> M-: (aref composition-function-table #x202d)
> 
>  => ([\c.\c^+ 1 compose-gstring-for-graphic]
>      [nil 0 compose-gstring-for-graphic])
> 
> All zero-width characters are explicitly given non-nil entries in
> composition-function-table, in composite.el:
> 
> (let ((elt '(["\\c.\\c^+" 1 compose-gstring-for-graphic]
>              [nil 0 compose-gstring-for-graphic])))
>   (map-char-table
>    #'(lambda (key val)
>        (if (= val 0)
>            (set-char-table-range composition-function-table key elt)))
>    char-width-table))

I don't see why this should be applicable to the characters in
question.  Perhaps the code you found assumes that any zero-width
character is necessarily a non-base character to be used in
compositions.  If so, this is a mistake, I think.





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

* bug#3452: 23.0.94; display
  2009-06-07  3:47 bug#3452: 23.0.94; display Chong Yidong
  2009-06-07  9:16 ` Eli Zaretskii
@ 2009-06-08  1:51 ` Kenichi Handa
  2009-06-08  4:48   ` Eli Zaretskii
  1 sibling, 1 reply; 16+ messages in thread
From: Kenichi Handa @ 2009-06-08  1:51 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 3452

In article <877hzoogc1.fsf@cyd.mit.edu>, Chong Yidong <cyd@stupidchicken.com> writes:

> > The problem stems from the character 8237 (#o20055, #x202d),
> > LEFT-TO-RIGHT OVERRIDE.  For some reason, the composition for this
> > character screws up line wrapping.

> Hi Handa-san, I investigated some more.  Let me know what you think.

> The entry for 8237 (#x202d) in char-width-table is 0: that is to say,
> char-width-table reports that the composition has zero width.  This is
> because of the following code in characters.el:

>   (let ((l '((#x0300 . #x036F)
>             ...
>             (#x202A . #x202E)
>             (#xE0001 . #xE01EF))))
>     (dolist (elt l)
>       (set-char-table-range char-width-table elt 0)))

> The function fill_gstring_body in composite.c uses char-width-table.
> However, composition_gstring_width for this character, called in
> term.c:1830, returns 1.  This inconsistency leads to the bug.

There's no inconsistency.

On terminal, if a zero-width character doesn't follow a base
character, Emacs composes that character by prepending SPACE
hoping that the terminal treats that zero-width character as
zero-width too.  This is to make that character still
edittable (e.g. we can put cursor on it) in Emacs.

So, even if char-width-table says it's zero width, all Emacs
display routines including indent.c treat that character's
width as 1.

But, gnome-terminal doesn't treat that character as
zero-width.  Please make the file "temp" by this code:

(with-temp-file "~/temp" (insert #x202d ?a ?\n))

and do "% cat ~/temp" on gnome-terminal.

> Maybe we should reconsider setting these characters to have zero-width
> for char-width-table in characters.el, since fill-gstring-body seems to
> handle zero-width compositions poorly.  WDYT?

fill_gstring_body (in composite.c) just initializes gstring.
The actual composition function
(compose-gstring-for-terminal on terminal) does the above
composition.

In article <E1MDEU1-0004sV-3H@fencepost.gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> I think it would be a bad idea to set these characters to anything but
> zero width.

I agree with that.

> These characters are not supposed to be displayed at all,
> they have no meaningful glyphs to show them.  They are just directives
> to the bidirectional display engines about how to convert logical
> order of characters to visual order.

But as Emacs 23 doesn't support bidi, at least we should
make it edittable, don't we?

> Btw, I don't understand how these characters are related to
> compositions.  They should not be composed with anything, they always
> stand for themselves.

Currently they are not composed with any other surrounding
characters (but only with an artificially prepended SPACE),
so we can say that they stand for themselves.

To conclude, I think there's not that much we can do for
this situation.  I think the current behaviour of
gnome-terminal (displaying standalone U+202D as a space of
width 1) is a bug.

---
Kenichi Handa
handa@m17n.org





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

* bug#3452: 23.0.94; display
  2009-06-08  1:51 ` Kenichi Handa
@ 2009-06-08  4:48   ` Eli Zaretskii
  2009-06-08  8:10     ` Kenichi Handa
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2009-06-08  4:48 UTC (permalink / raw)
  To: Kenichi Handa, 3452; +Cc: cyd

> From: Kenichi Handa <handa@m17n.org>
> Date: Mon, 08 Jun 2009 10:51:14 +0900
> Cc: 3452@emacsbugs.donarmstrong.com
> Reply-To: Kenichi Handa <handa@m17n.org>, 3452@emacsbugs.donarmstrong.com
> 
> On terminal, if a zero-width character doesn't follow a base
> character, Emacs composes that character by prepending SPACE
> hoping that the terminal treats that zero-width character as
> zero-width too.

So these characters should be currently displayed as SPACE?

Is it a good idea to rely on the terminal in this situation?  Do we
know for a fact that many (most?) terminals indeed behave like that
with zero-width characters?

> > These characters are not supposed to be displayed at all,
> > they have no meaningful glyphs to show them.  They are just directives
> > to the bidirectional display engines about how to convert logical
> > order of characters to visual order.
> 
> But as Emacs 23 doesn't support bidi, at least we should
> make it edittable, don't we?

Yes, definitely.  (Btw, I think make them editable even when Emacs
does support bidirectional editing.)

> > Btw, I don't understand how these characters are related to
> > compositions.  They should not be composed with anything, they always
> > stand for themselves.
> 
> Currently they are not composed with any other surrounding
> characters (but only with an artificially prepended SPACE),
> so we can say that they stand for themselves.

That's good, I think.

> To conclude, I think there's not that much we can do for
> this situation.  I think the current behaviour of
> gnome-terminal (displaying standalone U+202D as a space of
> width 1) is a bug.

If other terminals behave correctly, I would agree.  But if not,
perhaps we need to work around this, if possible.  For example, we
could have an entry in display tables for these characters.





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

* bug#3452: 23.0.94; display
  2009-06-08  4:48   ` Eli Zaretskii
@ 2009-06-08  8:10     ` Kenichi Handa
  2009-06-08  8:44       ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Kenichi Handa @ 2009-06-08  8:10 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 3452, cyd

In article <E1MDWmz-0001XD-Tm@fencepost.gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> > On terminal, if a zero-width character doesn't follow a base
> > character, Emacs composes that character by prepending SPACE
> > hoping that the terminal treats that zero-width character as
> > zero-width too.

> So these characters should be currently displayed as SPACE?

Yes, that's my intention.

> Is it a good idea to rely on the terminal in this situation?  Do we
> know for a fact that many (most?) terminals indeed behave like that
> with zero-width characters?

I'm not sure but I thought that it's reasonable to assume
that a character defined as zero-width by Unicode does not
occupy a screen column by itself.

Not for U+202D, but such combining characters as U+0300 are
treated correctly by xterm (not by gnome-terminal).

> > To conclude, I think there's not that much we can do for
> > this situation.  I think the current behaviour of
> > gnome-terminal (displaying standalone U+202D as a space of
> > width 1) is a bug.

> If other terminals behave correctly, I would agree.  But if not,
> perhaps we need to work around this, if possible.  For example, we
> could have an entry in display tables for these characters.

It seems xterm, gnome-terminal, GNU/Linux console, and
mlterm treat U+202D as spacing character, but, Konsole
(KDE's terminal) and kterm treats it as non-spacing
character.

---
Kenichi Handa
handa@m17n.org





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

* bug#3452: 23.0.94; display
  2009-06-08  8:10     ` Kenichi Handa
@ 2009-06-08  8:44       ` Eli Zaretskii
  2009-06-08 11:57         ` Kenichi Handa
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2009-06-08  8:44 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 3452, cyd

> From: Kenichi Handa <handa@m17n.org>
> CC: 3452@emacsbugs.donarmstrong.com, cyd@stupidchicken.com
> Date: Mon, 08 Jun 2009 17:10:27 +0900
> 
> Not for U+202D, but such combining characters as U+0300 are
> treated correctly by xterm (not by gnome-terminal).
> 
> > > To conclude, I think there's not that much we can do for
> > > this situation.  I think the current behaviour of
> > > gnome-terminal (displaying standalone U+202D as a space of
> > > width 1) is a bug.
> 
> > If other terminals behave correctly, I would agree.  But if not,
> > perhaps we need to work around this, if possible.  For example, we
> > could have an entry in display tables for these characters.
> 
> It seems xterm, gnome-terminal, GNU/Linux console, and
> mlterm treat U+202D as spacing character, but, Konsole
> (KDE's terminal) and kterm treats it as non-spacing
> character.

Wasn't gnome-terminal the one that started this bug report?  And you
even tell above that gnome-terminal does NOT treat U+202D correctly.
So which terminals do?

If xterm, the Linux console and mlterm do work, then maybe your
suggestion to do nothing is good enough.

Btw, what do you think about my idea to add a display table entry for
these characters?





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

* bug#3452: 23.0.94; display
  2009-06-08  8:44       ` Eli Zaretskii
@ 2009-06-08 11:57         ` Kenichi Handa
  2009-06-08 14:47           ` Chong Yidong
  2009-06-09 18:00           ` Chong Yidong
  0 siblings, 2 replies; 16+ messages in thread
From: Kenichi Handa @ 2009-06-08 11:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 3452, cyd

In article <E1MDaTK-0001yD-LX@fencepost.gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> > From: Kenichi Handa <handa@m17n.org>
> > CC: 3452@emacsbugs.donarmstrong.com, cyd@stupidchicken.com
> > Date: Mon, 08 Jun 2009 17:10:27 +0900
> > 
> > Not for U+202D, but such combining characters as U+0300 are
> > treated correctly by xterm (not by gnome-terminal).
> > 
> > > > To conclude, I think there's not that much we can do for
> > > > this situation.  I think the current behaviour of
> > > > gnome-terminal (displaying standalone U+202D as a space of
> > > > width 1) is a bug.
> > 
> > > If other terminals behave correctly, I would agree.  But if not,
> > > perhaps we need to work around this, if possible.  For example, we
> > > could have an entry in display tables for these characters.
> > 
> > It seems xterm, gnome-terminal, GNU/Linux console, and
> > mlterm treat U+202D as spacing character, but, Konsole
> > (KDE's terminal) and kterm treats it as non-spacing
> > character.

> Wasn't gnome-terminal the one that started this bug report?

I don't know exactly.  RMS's bug report just says "a 37-line
Linux terminal".

> And you even tell above that gnome-terminal does NOT treat
> U+202D correctly.  So which terminals do?

> If xterm, the Linux console and mlterm do work, then maybe your
> suggestion to do nothing is good enough.

??? I wrote "Konsole and kterm" treats U+202D as non-spacing
character.  I think that is the correct way, and the others
(gnome-terminal, xterm, and Linux console) are wrong.

> Btw, what do you think about my idea to add a display table entry for
> these characters?

A display table is used both for terminal and window system,
but, on a window system, some font may have special glyphs
for those characters.  If we setup a display table for
U+202D, Emacs can't display U+202D by such a glyph on window
system.

So, if we implement some work-around for such terminal as
gnome-terminal, I think it is better to modify
compose-gstring-for-terminal so that it replaces U+202D
(actually all zero-width characters of Unicode category Cf)
with a single SPACE instead of prepending a SPACE.  Please
try the attached patch.

---
Kenichi Handa
handa@m17n.org

--- composite.el.~1.46.~	2009-04-20 10:11:33.000000000 +0900
+++ composite.el	2009-06-08 20:45:50.000000000 +0900
@@ -681,7 +681,14 @@
 	      (lglyph-set-from-to glyph i i)
 	      (setq i (1+ i))))
 	(if (= (lglyph-width glyph) 0)
-	    (progn
+	    (if (eq (get-char-code-property (lglyph-char glyph)
+					    'general-category)
+		    'Cf)
+		(progn
+		  ;; Compose by replacing with a space.
+		  (lglyph-set-char glyph 32)
+		  (lglyph-set-width glyph 1)
+		  (setq i (1+ i)))
 	      ;; Compose by prepending a space.
 	      (setq gstring (lgstring-insert-glyph gstring i
 						   (lglyph-copy glyph))





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

* bug#3452: 23.0.94; display
  2009-06-08 11:57         ` Kenichi Handa
@ 2009-06-08 14:47           ` Chong Yidong
  2009-06-09 18:00           ` Chong Yidong
  1 sibling, 0 replies; 16+ messages in thread
From: Chong Yidong @ 2009-06-08 14:47 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 3452

Kenichi Handa <handa@m17n.org> writes:

>> > It seems xterm, gnome-terminal, GNU/Linux console, and
>> > mlterm treat U+202D as spacing character, but, Konsole
>> > (KDE's terminal) and kterm treats it as non-spacing
>> > character.
>
>> Wasn't gnome-terminal the one that started this bug report?
>
> I don't know exactly.  RMS's bug report just says "a 37-line
> Linux terminal".

He means the console on GNU/Linux.  I haven't tested there.

The problem I see is on xterm, where the current behavior is very
strange.  For example, with your earlier example:

(with-temp-file "~/atemp" (insert #x202d ?a ?\n))

Visit the file with emacs -nw -Q on an xterm and press C-f a few times.
You'll see that the "a" is displayed one glyph to the right of where it
should be.  Apprently, the console draws #x202d as two spaces, and this
leads to inconsistent display.

The same problem occurs on gnome-terminal.





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

* bug#3452: 23.0.94; display
  2009-06-08 11:57         ` Kenichi Handa
  2009-06-08 14:47           ` Chong Yidong
@ 2009-06-09 18:00           ` Chong Yidong
  2009-06-10  0:35             ` Kenichi Handa
  1 sibling, 1 reply; 16+ messages in thread
From: Chong Yidong @ 2009-06-09 18:00 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 3452

Kenichi Handa <handa@m17n.org> writes:

> So, if we implement some work-around for such terminal as
> gnome-terminal, I think it is better to modify
> compose-gstring-for-terminal so that it replaces U+202D
> (actually all zero-width characters of Unicode category Cf)
> with a single SPACE instead of prepending a SPACE.  Please
> try the attached patch.

The patch works very well.  Could you check it in?  Thanks.





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

* bug#3452: 23.0.94; display
  2009-06-09 18:00           ` Chong Yidong
@ 2009-06-10  0:35             ` Kenichi Handa
  0 siblings, 0 replies; 16+ messages in thread
From: Kenichi Handa @ 2009-06-10  0:35 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 3452

In article <87fxe9p9ro.fsf@cyd.mit.edu>, Chong Yidong <cyd@stupidchicken.com> writes:

> Kenichi Handa <handa@m17n.org> writes:
> > So, if we implement some work-around for such terminal as
> > gnome-terminal, I think it is better to modify
> > compose-gstring-for-terminal so that it replaces U+202D
> > (actually all zero-width characters of Unicode category Cf)
> > with a single SPACE instead of prepending a SPACE.  Please
> > try the attached patch.

> The patch works very well.  Could you check it in?  Thanks.

Ok, done.

---
Kenichi Handa
handa@m17n.org





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

end of thread, other threads:[~2009-06-10  0:35 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-07  3:47 bug#3452: 23.0.94; display Chong Yidong
2009-06-07  9:16 ` Eli Zaretskii
2009-06-07 13:56   ` Chong Yidong
2009-06-07 14:30     ` Eli Zaretskii
2009-06-07 20:41   ` Chong Yidong
2009-06-07 22:53     ` Eli Zaretskii
2009-06-08  1:51 ` Kenichi Handa
2009-06-08  4:48   ` Eli Zaretskii
2009-06-08  8:10     ` Kenichi Handa
2009-06-08  8:44       ` Eli Zaretskii
2009-06-08 11:57         ` Kenichi Handa
2009-06-08 14:47           ` Chong Yidong
2009-06-09 18:00           ` Chong Yidong
2009-06-10  0:35             ` Kenichi Handa
  -- strict thread matches above, loose matches on Subject: below --
2009-06-06  2:48 Chong Yidong
2009-06-03  2:53 Richard Stallman

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