GNU bug report logs -
#8506
24.0.50; Wrong column count
Previous Next
Reported by: Eli Barzilay <eli <at> barzilay.org>
Date: Fri, 15 Apr 2011 11:50:02 UTC
Severity: normal
Tags: notabug
Found in version 24.0.50
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8506 in the body.
You can then email your comments to 8506 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8506
; Package
emacs
.
(Fri, 15 Apr 2011 11:50:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Eli Barzilay <eli <at> barzilay.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 15 Apr 2011 11:50:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Column numbers in the mode line are wrong with certain characters, I've
seen this with angle brackets. To reproduce the problem:
* Start emacs and go to the scratch buffer
* M-x column-number-mode
* C-\ sgml RET
* enter ⟨
The column number that is shown is 2.
In GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0)
of 2011-04-15 on winooski.ccs.neu.edu
Windowing system distributor `Fedora Project', version 11.0.10904000
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: POSIX
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
value of $XMODIFIERS: @im=none
locale-coding-system: iso-latin-1-unix
default enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr message sendmail regexp-opt format-spec rfc822
mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader emacsbug
url-util url-parse auth-source eieio byte-opt bytecomp byte-compile
assoc gnus-util time-date password-cache url-vars mm-util mail-prsvr
multi-isearch pp help-fns cus-start cus-load quail help-mode easymenu
view tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8506
; Package
emacs
.
(Fri, 15 Apr 2011 14:57:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 8506 <at> debbugs.gnu.org (full text, mbox):
> From: Eli Barzilay <eli <at> barzilay.org>
> Date: Fri, 15 Apr 2011 07:48:45 -0400
>
> Column numbers in the mode line are wrong with certain characters, I've
> seen this with angle brackets. To reproduce the problem:
>
> * Start emacs and go to the scratch buffer
> * M-x column-number-mode
> * C-\ sgml RET
> * enter ⟨
>
> The column number that is shown is 2.
This is intentional. The character that is inserted by the above is
〈, u+2329 (LEFT-POINTING ANGLE BRACKET), and that character is marked
as "W" (meaning Wide) in the Unicode Data Base, see here:
http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt
Therefore, characters.el has this:
;; 2: East Asian Wide and Full-width characters.
(let ((l '((#x1100 . #x115F)
(#x2329 . #x232A) <<<<<<<<<<<<<<<<<<<<
(#x2E80 . #x303E)
(#x3040 . #xA4CF)
(#xAC00 . #xD7A3)
(#xF900 . #xFAFF)
(#xFE30 . #xFE6F)
(#xFF01 . #xFF60)
(#xFFE0 . #xFFE6)
(#x20000 . #x2FFFF)
(#x30000 . #x3FFFF))))
(dolist (elt l)
(set-char-table-range char-width-table elt 2)))
and consequently (aref char-width-table ?\〈) => 2. That's why Emacs
thinks you are in column 2 after this character: it is told that its
width is 2.
However, at least on my machine, with "Arial Unicode MS" font, the
character actually displays thinner than normal, so perhaps the font
is wrong.
OTOH, this page:
http://en.wikipedia.org/wiki/Bracket
says that these two characters "are canonically equivalent to the CJK
code points U+300x and thus likely to render as double-width symbols".
Unless someone comes up with a good reason why we should change the
width of this character in char-width-table, or there are other
characters which somehow defeat the column numbers, I suggest to close
this bug.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8506
; Package
emacs
.
(Fri, 15 Apr 2011 15:25:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 8506 <at> debbugs.gnu.org (full text, mbox):
25 minutes ago, Eli Zaretskii wrote:
> [...]
> This is intentional.
> [...]
>
> However, at least on my machine, with "Arial Unicode MS" font, the
> character actually displays thinner than normal, so perhaps the font
> is wrong.
Yeah, I have a similarly narrower rendering, using Consolas.
> OTOH, this page:
>
> http://en.wikipedia.org/wiki/Bracket
>
> says that these two characters "are canonically equivalent to the
> CJK code points U+300x and thus likely to render as double-width
> symbols".
>
> Unless someone comes up with a good reason why we should change the
> width of this character in char-width-table, or there are other
> characters which somehow defeat the column numbers, I suggest to
> close this bug.
Maybe add an option to make the column count ignore these widths
(which could also be used if you want it to be faster)?
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8506
; Package
emacs
.
(Fri, 15 Apr 2011 21:04:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 8506 <at> debbugs.gnu.org (full text, mbox):
6 hours ago, Eli Barzilay wrote:
> 25 minutes ago, Eli Zaretskii wrote:
> > [...]
> > This is intentional.
> > [...]
> >
> > However, at least on my machine, with "Arial Unicode MS" font, the
> > character actually displays thinner than normal, so perhaps the font
> > is wrong.
>
> Yeah, I have a similarly narrower rendering, using Consolas.
Two more points:
* It looks like it might be intentionally narrower -- I see that it's
exactly 1.5 times narrower than plain characters.
* Perhaps a better complaint would have been about cursor navigation.
I'm editing more text with those brackets, and the random horizontal
jumps make it a nightmare.
But at least I can now do
(set-char-table-range char-width-table '(#x2329 . #x232A) 1)
which less erroneous than the actual
(set-char-table-range char-width-table '(#x2329 . #x232A) 0.666)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8506
; Package
emacs
.
(Fri, 15 Apr 2011 21:16:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 8506 <at> debbugs.gnu.org (full text, mbox):
> From: Eli Barzilay <eli <at> barzilay.org>
> Date: Fri, 15 Apr 2011 17:03:25 -0400
>
> * Perhaps a better complaint would have been about cursor navigation.
> I'm editing more text with those brackets, and the random horizontal
> jumps make it a nightmare.
What jumps? You said nothing about cursor jumps in your original
report.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8506
; Package
emacs
.
(Fri, 15 Apr 2011 21:20:03 GMT)
Full text and
rfc822 format available.
Message #20 received at 8506 <at> debbugs.gnu.org (full text, mbox):
Two minutes ago, Eli Zaretskii wrote:
> > From: Eli Barzilay <eli <at> barzilay.org>
> > Date: Fri, 15 Apr 2011 17:03:25 -0400
> >
> > * Perhaps a better complaint would have been about cursor
> > navigation. I'm editing more text with those brackets, and the
> > random horizontal jumps make it a nightmare.
>
> What jumps? You said nothing about cursor jumps in your original
> report.
[Brain fart, sorry. Those were my own functions.]
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#8506
; Package
emacs
.
(Fri, 07 Oct 2011 07:06:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 8506 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii wrote:
> That's why Emacs thinks you are in column 2 after this character: it
> is told that its width is 2.
From reading this report, it seems to me that there is not actually a
bug here, is that correct?
(The rest of the discussion seems to be about fonts and some
user-defined functions.)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#8506
; Package
emacs
.
(Fri, 07 Oct 2011 11:50:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 8506 <at> debbugs.gnu.org (full text, mbox):
> From: Glenn Morris <rgm <at> gnu.org>
> Cc: Eli Barzilay <eli <at> barzilay.org>, 8506 <at> debbugs.gnu.org
> Date: Fri, 07 Oct 2011 03:05:03 -0400
>
> Eli Zaretskii wrote:
>
> > That's why Emacs thinks you are in column 2 after this character: it
> > is told that its width is 2.
>
> >From reading this report, it seems to me that there is not actually a
> bug here, is that correct?
Yes, it's correct.
Added tag(s) notabug.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 07 Oct 2011 16:23:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
8506 <at> debbugs.gnu.org and Eli Barzilay <eli <at> barzilay.org>
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 07 Oct 2011 16:23:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 05 Nov 2011 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 231 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.