GNU bug report logs - #10978
`calendar-string-spread' loses with double-width characters

Previous Next

Package: emacs;

Reported by: Štěpán Němec <stepnem <at> gmail.com>

Date: Fri, 9 Mar 2012 11:59:02 UTC

Severity: normal

Fixed in version 24.0.95

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Glenn Morris <rgm <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#10978: closed (`calendar-string-spread' loses with
 double-width characters)
Date: Fri, 16 Mar 2012 01:43:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 15 Mar 2012 21:12:06 -0400
with message-id <kdobrxl57d.fsf <at> fencepost.gnu.org>
and subject line Re: bug#10978: `calendar-string-spread' loses with double-width characters
has caused the debbugs.gnu.org bug report #10978,
regarding `calendar-string-spread' loses with double-width characters
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
10978: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10978
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Štěpán Němec <stepnem <at> gmail.com>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: `calendar-string-spread' loses with double-width characters
Date: Fri, 09 Mar 2012 12:57:30 +0100
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


[Message part 3 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 10978-done <at> debbugs.gnu.org
Subject: Re: bug#10978: `calendar-string-spread' loses with double-width
	characters
Date: Thu, 15 Mar 2012 21:12:06 -0400
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.


This bug report was last modified 13 years and 69 days ago.

Previous Next


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