GNU bug report logs - #54488
29.0.50; move-to-column/overlay-related regression in latest master, perhaps 28?

Previous Next

Package: emacs;

Reported by: João Távora <joaotavora <at> gmail.com>

Date: Mon, 21 Mar 2022 06:54:02 UTC

Severity: normal

Found in version 29.0.50

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: 54488 <at> debbugs.gnu.org, dgutov <at> yandex.ru
Subject: Re: bug#54488: 29.0.50; move-to-column/overlay-related regression
 in latest master, perhaps 28?
Date: Thu, 24 Mar 2022 18:59:09 +0200
> From: João Távora <joaotavora <at> gmail.com>
> Cc: dgutov <at> yandex.ru,  54488 <at> debbugs.gnu.org
> Date: Thu, 24 Mar 2022 16:03:59 +0000
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> An interesting one, though.  I think I follow.  Is there some easy way
> >> in Emacs to measure how many UTF-16 code units a given codepoint takes?
> >
> > That's easy: any codepoint above #xFFFF needs 2 UTF-16 code units.
> 
> >> I'm afraid I evicted this knowledge from the cache since I made that fix
> >> 2,5 years ago... Is a "codepoint" here a character in a string/buffer?
> >
> > Yes.
> 
> Indeed seems easy enough :-).  So
> 
> (defun measure (s) (cl-loop for c across s sum (if (> c #xFFFF) 2 1)))
> 
> ?

Yes, I think so.




This bug report was last modified 3 years and 84 days ago.

Previous Next


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