all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#3452: 23.0.94; display
@ 2009-06-06  2:48 Chong Yidong
  0 siblings, 0 replies; 17+ 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] 17+ 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; 17+ 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] 17+ messages in thread

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

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87ocswdvce.fsf@cyd.mit.edu>
2009-06-03  2:53 ` bug#3452: 23.0.94; display Richard Stallman
2009-06-10 14:25   ` bug#3452: marked as done (23.0.94; display) Emacs bug Tracking System
2009-06-06  2:48 bug#3452: 23.0.94; display Chong Yidong
  -- strict thread matches above, loose matches on Subject: below --
2009-06-07  3:47 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.