Subject: bug#10978: closed (Re: bug#10978: `calendar-string-spread' loses with double-width characters)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 16 Mar 2012 01:43:03 +0000

Your bug report

#10978: `calendar-string-spread' loses with double-width characters

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
10978: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10978
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#10978: `calendar-string-spread' loses with double-width characters
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Thu, 15 Mar 2012 21:12:06 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 24.0.95

> Eli Zaretskii wrote:
>
>> But it looks like calendar-insert-at-column and calendar-string-spread
>> also need similar changes.

Both hopefully fixed.

Subject: `calendar-string-spread' loses with double-width characters
From: Štěpán Němec <[email-masked]>
To: bug-gnu-emacs <[email-masked]>
Date: Fri, 09 Mar 2012 12:57:30 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

The algorithm used obviously works using `length', but for every
double-width character the resulting string is one char too long when
actually displayed, defeating its purpose when formatting the calendar
mode line (`calendar-update-mode-line' et al.).

Ex.:

(calendar-string-spread '("a" "b" "c") ?\s 10)
;=> "a   b    c" ; OK

(calendar-string-spread '("矢" "b" "c") ?\s 10)
;=> "矢   b    c" ; not OK

-- 
Štěpán