GNU bug report logs - #60781
28.2; column-number-mode counts differently based on character encoding

Previous Next

Package: emacs;

Reported by: Van Ly <van.ly <at> sdf.org>

Date: Fri, 13 Jan 2023 13:42:02 UTC

Severity: normal

Tags: notabug

Found in version 28.2

Done: Eli Zaretskii <eliz <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 60781 in the body.
You can then email your comments to 60781 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#60781; Package emacs. (Fri, 13 Jan 2023 13:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Van Ly <van.ly <at> sdf.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 13 Jan 2023 13:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Van Ly <van.ly <at> sdf.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.2;
 column-number-mode counts differently based on character encoding
Date: Fri, 13 Jan 2023 13:31:29 GMT
[Message part 1 (text/plain, inline)]
Hello,

// one right arrow key move of the cursor from the left most position
// numbers differently in column-number-mode based on character encoding

These steps reproduce the observed unexpected behavior:

* emacs -Q /tmp/example.text
* move cursor to line two at left most position, then right arrow key once
* M-x column-number-mode
* the modeline indicator shows (2,2)
* move cursor to line nine at left most position, then right arrow key once
* the modeline indicator shows (9,1)

// for cjk the column number is two
// for ascii the column number is one

* expected modeline indicator to show (2,1) and (9,1)

See attached: bug-report.text, example.text
[bug-report.text (application/octet-stream, attachment)]
[example.text (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60781; Package emacs. (Fri, 13 Jan 2023 18:34:01 GMT) Full text and rfc822 format available.

Message #8 received at 60781 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Van Ly <van.ly <at> sdf.org>
Cc: 60781 <at> debbugs.gnu.org
Subject: Re: bug#60781: 28.2;
 column-number-mode counts differently based on character encoding
Date: Fri, 13 Jan 2023 20:32:57 +0200
tags 60781 notabug
thanks

> Date: Fri, 13 Jan 2023 13:31:29 GMT
> From: Van Ly <van.ly <at> sdf.org>
> 
> // one right arrow key move of the cursor from the left most position
> // numbers differently in column-number-mode based on character encoding
> 
> These steps reproduce the observed unexpected behavior:
> 
> * emacs -Q /tmp/example.text
> * move cursor to line two at left most position, then right arrow key once
> * M-x column-number-mode
> * the modeline indicator shows (2,2)
> * move cursor to line nine at left most position, then right arrow key once
> * the modeline indicator shows (9,1)
> 
> // for cjk the column number is two
> // for ascii the column number is one
> 
> * expected modeline indicator to show (2,1) and (9,1)

Your expectations are incorrect.  Some characters, including the ones
in line 2 of your example file, are double-width characters, they take
up more than one column on display.  Which characters take two columns
is defined by the Unicode standard, and most fonts follow that
standard, in that the character glyphs they provide are indeed wider
than ASCII or Latin characters.  And column-number-mode counts columns
on display, it doesn't count characters.

This is not a bug, but the expected and correct behavior.




Added tag(s) notabug. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 13 Jan 2023 18:34:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60781; Package emacs. (Sat, 14 Jan 2023 03:11:01 GMT) Full text and rfc822 format available.

Message #13 received at 60781 <at> debbugs.gnu.org (full text, mbox):

From: Van Ly <van.ly <at> sdf.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 60781 <at> debbugs.gnu.org
Subject: Re: bug#60781: 28.2;
 column-number-mode counts differently based on character encoding
Date: Sat, 14 Jan 2023 03:10:50 GMT
Thanks.

I will file it a bug in my idea of human centered design principle. \smiley





Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 14 Jan 2023 07:27:02 GMT) Full text and rfc822 format available.

Notification sent to Van Ly <van.ly <at> sdf.org>:
bug acknowledged by developer. (Sat, 14 Jan 2023 07:27:02 GMT) Full text and rfc822 format available.

Message #18 received at 60781-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Van Ly <van.ly <at> sdf.org>
Cc: 60781-done <at> debbugs.gnu.org
Subject: Re: bug#60781: 28.2;
 column-number-mode counts differently based on character encoding
Date: Sat, 14 Jan 2023 09:26:41 +0200
> Date: Sat, 14 Jan 2023 03:10:50 GMT
> From: Van Ly <van.ly <at> sdf.org>
> Cc: 60781 <at> debbugs.gnu.org
> 
> 
> Thanks.
> 
> I will file it a bug in my idea of human centered design principle. \smiley

I'm therefore closing the bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 11 Feb 2023 12:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 80 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.