emacs-devel
[Top][All Lists]
Advanced

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

Re: yet more term.el fixes #2


From: Dan Nicolaescu
Subject: Re: yet more term.el fixes #2
Date: Tue, 21 Sep 2004 21:18:16 -0700

Miles Bader <address@hidden> writes:

  > Dan Nicolaescu <address@hidden> writes:
  > > One remaining problem in term.el is the handling of characters in the
  > > 128-255 range (and probably the non 8-bit encodings too).  term.el
  > > uses move-to-column to position the cursor at certain positions in the
  > > buffer. But the char-width of a character >127 is 4 (at least in my
  > > setup), this confuses the cursor positioning
  > 
  > Seems odd... in *scratch* in an `emacs -q' session:
  > 
  >    (char-width ?\217)
  >    1
  >    (char-width ?á)
  >    1
  >    (char-width ?字)
  >    2

Looking closer, the characters > 158 decimal have char-width 4 in my
setup. 

Use this to print all the widths: 
(defun print-width ()
  (interactive)
  (let ((i 0))
    (while (< i 256)
      (insert (format "%d %d %c\n" i (char-width i) i) )
      (setq i (1+ i)))))

Anything with != 1 will confuse term.el if sent to the terminal as
such.

  > Does term.el use some funny buffer settings?

Not AFAIK. 





reply via email to

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